about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorMorgan Jones <me@numin.it>2023-12-09 20:35:09 -0800
committerMorgan Jones <me@numin.it>2023-12-09 20:35:09 -0800
commitce5124df923d09ca9db71768b831f17cf065b1a2 (patch)
tree23491938df1c9f8b99cc723cea21283a3edfbc6c /nixos/tests
parentb9cb1d8d5f87cbd4c9316ca5a513d107fb6ea593 (diff)
downloadnixlib-ce5124df923d09ca9db71768b831f17cf065b1a2.tar
nixlib-ce5124df923d09ca9db71768b831f17cf065b1a2.tar.gz
nixlib-ce5124df923d09ca9db71768b831f17cf065b1a2.tar.bz2
nixlib-ce5124df923d09ca9db71768b831f17cf065b1a2.tar.lz
nixlib-ce5124df923d09ca9db71768b831f17cf065b1a2.tar.xz
nixlib-ce5124df923d09ca9db71768b831f17cf065b1a2.tar.zst
nixlib-ce5124df923d09ca9db71768b831f17cf065b1a2.zip
nixos/nebula: fix possibly flaky tests
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/nebula.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/tests/nebula.nix b/nixos/tests/nebula.nix
index 89b91d89fcb3..1bece2200f23 100644
--- a/nixos/tests/nebula.nix
+++ b/nixos/tests/nebula.nix
@@ -144,6 +144,7 @@ in
 
     restartAndCheckNebula = name: ip: ''
       ${name}.systemctl("restart nebula@smoke.service")
+      ${name}.wait_for_unit("nebula@smoke.service")
       ${name}.succeed("ping -c5 ${ip}")
     '';
 
@@ -179,6 +180,8 @@ in
       ${nodeB}.succeed("iptables -I INPUT -s " + node_a + " -j DROP")
       ${nodeA}.systemctl("restart nebula@smoke.service")
       ${nodeB}.systemctl("restart nebula@smoke.service")
+      ${nodeA}.wait_for_unit("nebula@smoke.service")
+      ${nodeB}.wait_for_unit("nebula@smoke.service")
     '';
     allowTrafficBetween = nodeA: nodeB: ''
       node_a = ${getPublicIp nodeA}
@@ -187,6 +190,8 @@ in
       ${nodeB}.succeed("iptables -D INPUT -s " + node_a + " -j DROP")
       ${nodeA}.systemctl("restart nebula@smoke.service")
       ${nodeB}.systemctl("restart nebula@smoke.service")
+      ${nodeA}.wait_for_unit("nebula@smoke.service")
+      ${nodeB}.wait_for_unit("nebula@smoke.service")
     '';
   in ''
     # Create the certificate and sign the lighthouse's keys.