diff --git a/tests/integration/rpsc-test.nix b/tests/integration/rpsc-test.nix index dff4698f..c53d4efc 100644 --- a/tests/integration/rpsc-test.nix +++ b/tests/integration/rpsc-test.nix @@ -327,11 +327,13 @@ in """) 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 '' 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 diff --git a/tests/systemd/rosenpass.nix b/tests/systemd/rosenpass.nix index a0827c1c..3b2fc19d 100644 --- a/tests/systemd/rosenpass.nix +++ b/tests/systemd/rosenpass.nix @@ -156,15 +156,13 @@ in { ... }: '' from os import system - import time rosenpass = "${pkgs.rosenpass}/bin/rosenpass" start_all() for machine in [server, client]: - machine.wait_for_unit("multi-user.target") - time.sleep(10) - machine.wait_for_unit("network-online.target") # rosenpass + machine.wait_for_unit("multi-user.target") # (unit: rosenpass) + machine.wait_until_succeeds("ip route get 1.1.1.1") # (unit: rosenpass) with subtest("Key, Config, and Service Setup"): for name, machine, remote in [("server", server, client), ("client", client, server)]: diff --git a/tests/systemd/rp.nix b/tests/systemd/rp.nix index 12b0f4db..a554a8f2 100644 --- a/tests/systemd/rp.nix +++ b/tests/systemd/rp.nix @@ -112,15 +112,13 @@ in { ... }: '' from os import system - import time rp = "${pkgs.rosenpass}/bin/rp" start_all() for machine in [server, client]: - machine.wait_for_unit("multi-user.target") - time.sleep(10) - machine.wait_for_unit("network-online.target") # rp + machine.wait_for_unit("multi-user.target") # (unit: rp) + machine.wait_until_succeeds("ip route get 1.1.1.1") # (unit: rp) with subtest("Key, Config, and Service Setup"): for name, machine, remote in [("server", server, client), ("client", client, server)]: