nixos/nebula: fix possibly flaky tests

This commit is contained in:
Morgan Jones 2023-12-09 20:35:09 -08:00
parent b9cb1d8d5f
commit ce5124df92
No known key found for this signature in database
GPG Key ID: 52BAC54ED447974E

View File

@ -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.