mirror of
https://github.com/NixOS/nix
synced 2025-07-08 19:23:54 +02:00
tests: Wait for network *online* targets
More prevalent than I thought in15073e86a
See also3588783032
which is a failed github-flakes test without "Network is Online" (cherry picked from commit6f0bdd9ae7
) # Conflicts: # tests/nixos/nix-docker.nix
This commit is contained in:
parent
d8872fce2c
commit
011084b127
6 changed files with 64 additions and 0 deletions
|
@ -102,6 +102,7 @@ in
|
|||
};
|
||||
|
||||
testScript = { nodes, ... }: ''
|
||||
http_dns.wait_for_unit("network-online.target")
|
||||
http_dns.wait_for_unit("nginx")
|
||||
http_dns.wait_for_open_port(80)
|
||||
http_dns.wait_for_unit("unbound")
|
||||
|
@ -109,6 +110,7 @@ in
|
|||
|
||||
client.start()
|
||||
client.wait_for_unit('multi-user.target')
|
||||
client.wait_for_unit('network-online.target')
|
||||
|
||||
with subtest("can fetch data from a remote server outside sandbox"):
|
||||
client.succeed("nix --version >&2")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue