nixos/tests: manualy start networkd-wait-online

Fix some tests that broke after 2370696d.
This commit is contained in:
rnhmjoj 2024-12-31 09:37:23 +01:00
parent 6ba05144a0
commit 3f7a10dc74
No known key found for this signature in database
GPG key ID: BFBAF4C975F76450
5 changed files with 10 additions and 2 deletions

View file

@ -223,6 +223,7 @@ import ./make-test-python.nix (
''
start_all()
router.wait_for_unit("kea-dhcp4-server.service")
client.systemctl("start systemd-networkd-wait-online.service")
client.wait_for_unit("systemd-networkd-wait-online.service")
client.wait_until_succeeds("ping -c 5 10.0.0.1")
router.wait_until_succeeds("ping -c 5 10.0.0.3")

View file

@ -39,7 +39,9 @@ import ./make-test-python.nix (
testScript = ''
start_all()
node1.systemctl("start systemd-networkd-wait-online.service")
node1.wait_for_unit("systemd-networkd-wait-online.service")
node2.systemctl("start systemd-networkd-wait-online.service")
node2.wait_for_unit("systemd-networkd-wait-online.service")
with subtest("test RestrictNetworkInterfaces= works"):

View file

@ -131,6 +131,7 @@ import ./make-test-python.nix (
start_all()
for n in network_nodes + network_switches:
n.systemctl("start systemd-networkd-wait-online.service")
n.wait_for_unit("systemd-networkd-wait-online.service")
node1.succeed("ping 10.0.0.2 -w 10 -c 1")

View file

@ -73,6 +73,7 @@ import ./make-test-python.nix (
start_all()
with subtest("check router network configuration"):
router.systemctl("start systemd-networkd-wait-online.service")
router.wait_for_unit("systemd-networkd-wait-online.service")
eth1_status = router.succeed("networkctl status eth1")
assert "Network File: /etc/systemd/network/01-eth1.network" in eth1_status, \
@ -80,6 +81,7 @@ import ./make-test-python.nix (
assert "10.0.0.1" in eth1_status, "Did not find expected router IPv4"
with subtest("check client network configuration"):
client.systemctl("start systemd-networkd-wait-online.service")
client.wait_for_unit("systemd-networkd-wait-online.service")
eth1_status = client.succeed("networkctl status eth1")
assert "Network File: /etc/systemd/network/40-eth1.network" in eth1_status, \

View file

@ -96,10 +96,12 @@ in import ./make-test-python.nix ({pkgs, ... }: {
};
testScript = ''
start_all()
node1.succeed("systemctl start systemd-networkd-wait-online@eth1.service")
node1.systemctl("start systemd-networkd-wait-online@eth1.service")
node1.systemctl("start systemd-networkd-wait-online.service")
node1.wait_for_unit("systemd-networkd-wait-online@eth1.service")
node1.wait_for_unit("systemd-networkd-wait-online.service")
node2.succeed("systemctl start systemd-networkd-wait-online@eth1.service")
node2.systemctl("start systemd-networkd-wait-online@eth1.service")
node2.systemctl("start systemd-networkd-wait-online.service")
node2.wait_for_unit("systemd-networkd-wait-online@eth1.service")
node2.wait_for_unit("systemd-networkd-wait-online.service")