From 1943b60ad820730a74d1dffcdddac396d0c1cb00 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 21 Jan 2013 22:36:23 +0100 Subject: [PATCH] Fix the VM tests --- tests/nix-copy-closure.nix | 8 ++++---- tests/remote-builds.nix | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/nix-copy-closure.nix b/tests/nix-copy-closure.nix index db6103b9cb..ca09dffac2 100644 --- a/tests/nix-copy-closure.nix +++ b/tests/nix-copy-closure.nix @@ -13,14 +13,14 @@ makeTest ({ pkgs, ... }: let pkgA = pkgs.aterm; pkgB = pkgs.wget; in { virtualisation.pathsInNixDB = [ pkgA ]; environment.nix = nix; }; - + server = { config, pkgs, ... }: { services.openssh.enable = true; virtualisation.writableStore = true; virtualisation.pathsInNixDB = [ pkgB ]; environment.nix = nix; - }; + }; }; testScript = { nodes }: @@ -36,8 +36,8 @@ makeTest ({ pkgs, ... }: let pkgA = pkgs.aterm; pkgB = pkgs.wget; in { # Install the SSH key on the server. $server->succeed("mkdir -m 700 /root/.ssh"); $server->copyFileFromHost("key.pub", "/root/.ssh/authorized_keys"); - $server->waitForJob("sshd"); - $client->waitForJob("network-interfaces"); + $server->waitForUnit("sshd"); + $client->waitForUnit("network.target"); $client->succeed("ssh -o StrictHostKeyChecking=no " . $server->name() . " 'echo hello world'"); # Copy the closure of package A from the client to the server. diff --git a/tests/remote-builds.nix b/tests/remote-builds.nix index b0d2547c66..6d38fb5680 100644 --- a/tests/remote-builds.nix +++ b/tests/remote-builds.nix @@ -72,11 +72,11 @@ in $client->succeed("chmod 600 /root/.ssh/id_dsa"); # Install the SSH key on the slaves. - $client->waitForJob("network-interfaces"); + $client->waitForUnit("network.target"); foreach my $slave ($slave1, $slave2) { $slave->succeed("mkdir -m 700 /root/.ssh"); $slave->copyFileFromHost("key.pub", "/root/.ssh/authorized_keys"); - $slave->waitForJob("sshd"); + $slave->waitForUnit("sshd"); $client->succeed("ssh -o StrictHostKeyChecking=no " . $slave->name() . " 'echo hello world'"); }