mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-06-12 11:01:19 -07:00
fix error: nix integration tests: add more robust check to wait for network-online.status
This commit is contained in:
@@ -327,11 +327,13 @@ in
|
|||||||
""")
|
""")
|
||||||
|
|
||||||
for m in [peerA, peerB, peerakeyexchanger, peerbkeyexchanger]:
|
for m in [peerA, peerB, peerakeyexchanger, peerbkeyexchanger]:
|
||||||
m.wait_for_unit("network-online.target") # rpsc-test 1
|
m.wait_for_unit("multi-user.target") # (unit: rpsc-test 1)
|
||||||
|
m.wait_until_succeeds("ip route get 1.1.1.1") # (unit: rpsc-test 1)
|
||||||
|
|
||||||
${lib.optionalString multiPeer ''
|
${lib.optionalString multiPeer ''
|
||||||
for m in [peerC, peerckeyexchanger]:
|
for m in [peerC, peerckeyexchanger]:
|
||||||
m.wait_for_unit("network-online.target") # rpsc-test 2
|
m.wait_for_unit("multi-user.target") # (unit: rpsc-test 2)
|
||||||
|
m.wait_until_succeeds("ip route get 1.1.1.1") # (unit: rpsc-test 2)
|
||||||
''}
|
''}
|
||||||
|
|
||||||
# Generate the normal wireguard key pairs
|
# Generate the normal wireguard key pairs
|
||||||
|
|||||||
@@ -156,15 +156,13 @@ in
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
''
|
''
|
||||||
from os import system
|
from os import system
|
||||||
import time
|
|
||||||
rosenpass = "${pkgs.rosenpass}/bin/rosenpass"
|
rosenpass = "${pkgs.rosenpass}/bin/rosenpass"
|
||||||
|
|
||||||
start_all()
|
start_all()
|
||||||
|
|
||||||
for machine in [server, client]:
|
for machine in [server, client]:
|
||||||
machine.wait_for_unit("multi-user.target")
|
machine.wait_for_unit("multi-user.target") # (unit: rosenpass)
|
||||||
time.sleep(10)
|
machine.wait_until_succeeds("ip route get 1.1.1.1") # (unit: rosenpass)
|
||||||
machine.wait_for_unit("network-online.target") # rosenpass
|
|
||||||
|
|
||||||
with subtest("Key, Config, and Service Setup"):
|
with subtest("Key, Config, and Service Setup"):
|
||||||
for name, machine, remote in [("server", server, client), ("client", client, server)]:
|
for name, machine, remote in [("server", server, client), ("client", client, server)]:
|
||||||
|
|||||||
@@ -112,15 +112,13 @@ in
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
''
|
''
|
||||||
from os import system
|
from os import system
|
||||||
import time
|
|
||||||
rp = "${pkgs.rosenpass}/bin/rp"
|
rp = "${pkgs.rosenpass}/bin/rp"
|
||||||
|
|
||||||
start_all()
|
start_all()
|
||||||
|
|
||||||
for machine in [server, client]:
|
for machine in [server, client]:
|
||||||
machine.wait_for_unit("multi-user.target")
|
machine.wait_for_unit("multi-user.target") # (unit: rp)
|
||||||
time.sleep(10)
|
machine.wait_until_succeeds("ip route get 1.1.1.1") # (unit: rp)
|
||||||
machine.wait_for_unit("network-online.target") # rp
|
|
||||||
|
|
||||||
with subtest("Key, Config, and Service Setup"):
|
with subtest("Key, Config, and Service Setup"):
|
||||||
for name, machine, remote in [("server", server, client), ("client", client, server)]:
|
for name, machine, remote in [("server", server, client), ("client", client, server)]:
|
||||||
|
|||||||
Reference in New Issue
Block a user