mirror of
https://github.com/NixOS/nix
synced 2025-06-25 02:21:16 +02:00
tests: Wait for network *online* and multi-user targets
This should help prevent some test stalls. By default, multi-user.target does not imply that the network is fully up.
This commit is contained in:
parent
263a818bee
commit
15073e86a8
5 changed files with 17 additions and 5 deletions
|
@ -89,10 +89,13 @@ in
|
|||
client.succeed("chmod 600 /root/.ssh/id_ed25519")
|
||||
|
||||
# Install the SSH key on the builder.
|
||||
client.wait_for_unit("network.target")
|
||||
client.wait_for_unit("network-online.target")
|
||||
builder.succeed("mkdir -p -m 700 /root/.ssh")
|
||||
builder.copy_from_host("key.pub", "/root/.ssh/authorized_keys")
|
||||
builder.wait_for_unit("sshd")
|
||||
builder.wait_for_unit("multi-user.target")
|
||||
builder.wait_for_unit("network-online.target")
|
||||
|
||||
client.succeed(f"ssh -o StrictHostKeyChecking=no {builder.name} 'echo hello world'")
|
||||
|
||||
# Perform a build
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue