summary refs log tree commit diff
path: root/tests/openssh.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2011-01-12 17:36:15 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2011-01-12 17:36:15 +0000
commitfd4885528445b94aea7dd15a09bee85c2bc1defe (patch)
tree447dd7db1dc975a8f514e782d51250ac4181580c /tests/openssh.nix
parent04b43f1e3f1a7eb2b80898ca4a6ad4908e1967bf (diff)
downloadnixpkgs-fd4885528445b94aea7dd15a09bee85c2bc1defe.tar
nixpkgs-fd4885528445b94aea7dd15a09bee85c2bc1defe.tar.gz
nixpkgs-fd4885528445b94aea7dd15a09bee85c2bc1defe.tar.bz2
nixpkgs-fd4885528445b94aea7dd15a09bee85c2bc1defe.tar.lz
nixpkgs-fd4885528445b94aea7dd15a09bee85c2bc1defe.tar.xz
nixpkgs-fd4885528445b94aea7dd15a09bee85c2bc1defe.tar.zst
nixpkgs-fd4885528445b94aea7dd15a09bee85c2bc1defe.zip
* No wonder the OpenSSH test was so unreliable: it didn't wait for the
  sshd Upstart job to finish.

svn path=/nixos/trunk/; revision=25524
Diffstat (limited to 'tests/openssh.nix')
-rw-r--r--tests/openssh.nix15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/openssh.nix b/tests/openssh.nix
index ca96e6ccfc9..1c93f8a3b41 100644
--- a/tests/openssh.nix
+++ b/tests/openssh.nix
@@ -1,25 +1,26 @@
-{pkgs, ...}:
+{ pkgs, ... }:
 
 {
   nodes = {
   
     server = 
-      {pkgs, config, ...}:
+      { config, pkgs, ... }:
       
       {
         services.openssh.enable = true;
       };
       
     client = 
-      {pkgs, config, ...}:
+      { config, pkgs, ... }: { };
       
-      {
-      };
   };
   
-  testScript =
-  ''
+  testScript = ''
+    startAll;
+    
     my $key=`${pkgs.openssh}/bin/ssh-keygen -t dsa -f key -N ""`;
+
+    $server->waitForJob("sshd");
     
     $server->mustSucceed("mkdir -m 700 /root/.ssh");
     $server->copyFileFromHost("key.pub", "/root/.ssh/authorized_keys");