mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
nixosTests.firewall-firewalld: wait until state is running
(cherry picked from commit 04b8fdb00a)
This commit is contained in:
parent
e789bb2f0f
commit
8de7d07b79
1 changed files with 5 additions and 0 deletions
|
|
@ -89,12 +89,17 @@
|
|||
else
|
||||
"nixos-firewall-tool open tcp 80";
|
||||
reset = if backend == "firewalld" then "firewall-cmd --reload" else "nixos-firewall-tool reset";
|
||||
# https://github.com/firewalld/firewalld/issues/1571
|
||||
waitForFirewalld = lib.optionalString (backend == "firewalld") ''
|
||||
walled.wait_until_succeeds("firewall-cmd --state")
|
||||
'';
|
||||
in
|
||||
''
|
||||
start_all()
|
||||
|
||||
walled.wait_for_unit("${unit}")
|
||||
walled.wait_for_unit("httpd")
|
||||
${waitForFirewalld}
|
||||
attacker.wait_for_unit("network.target")
|
||||
|
||||
# Local connections should still work.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue