aboutsummaryrefslogtreecommitdiff
path: root/tests/nixos/remote-builds-ssh-ng.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nixos/remote-builds-ssh-ng.nix')
-rw-r--r--tests/nixos/remote-builds-ssh-ng.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/nixos/remote-builds-ssh-ng.nix b/tests/nixos/remote-builds-ssh-ng.nix
index cca4066f3..5ff471607 100644
--- a/tests/nixos/remote-builds-ssh-ng.nix
+++ b/tests/nixos/remote-builds-ssh-ng.nix
@@ -78,6 +78,11 @@ in
start_all()
+ builder.succeed("systemctl start network-online.target")
+ client.succeed("systemctl start network-online.target")
+ builder.wait_for_unit("network-online.target")
+ client.wait_for_unit("network-online.target")
+
# Create an SSH key on the client.
subprocess.run([
"${hostPkgs.openssh}/bin/ssh-keygen", "-t", "ed25519", "-f", "key", "-N", ""
@@ -87,11 +92,10 @@ in
client.succeed("chmod 600 /root/.ssh/id_ed25519")
# Install the SSH key on the builder.
- client.wait_for_unit("network.target")
builder.succeed("mkdir -p -m 700 /root/.ssh")
builder.copy_from_host("key.pub", "/root/.ssh/authorized_keys")
- builder.wait_for_unit("sshd")
- client.succeed(f"ssh -o StrictHostKeyChecking=no {builder.name} 'echo hello world'")
+ builder.wait_for_unit("sshd.service")
+ client.succeed(f"ssh -o StrictHostKeyChecking=no {builder.name} 'echo hello world' >&2")
# Perform a build
out = client.succeed("nix-build ${expr nodes.client 1} 2> build-output")