mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 07:16:17 +02:00
tests/nixos/remote-builds: Wait for multi-user
This should make the test more robust, considering the strange hang in https://hydra.nixos.org/build/267517233/nixlog/8 `builder` seems to have reached `multi-user.target` before the SSH connection was established, but this seems to be coincidental. This does tell us that enforcing this has a minimal cost in terms of runtime. Waiting for `multi-user.target` on the client is honestly paranoid, but flaky tests are very bad for productivity.
This commit is contained in:
parent
f4464873f5
commit
7c5a0b06a4
1 changed files with 5 additions and 0 deletions
|
@ -104,6 +104,11 @@ in
|
|||
builder.succeed("mkdir -p -m 700 /root/.ssh")
|
||||
builder.copy_from_host("key.pub", "/root/.ssh/authorized_keys")
|
||||
builder.wait_for_unit("sshd")
|
||||
# Make sure the builder can handle our login correctly
|
||||
builder.wait_for_unit("multi-user.target")
|
||||
# Make sure there's no funny business on the client either
|
||||
# (should not be necessary, but we have reason to be careful)
|
||||
client.wait_for_unit("multi-user.target")
|
||||
client.succeed(f"""
|
||||
ssh -o StrictHostKeyChecking=no {builder.name} \
|
||||
'echo hello world on $(hostname)' >&2
|
||||
|
|
Loading…
Reference in a new issue