Skip to content

Commit

Permalink
test: use is-active instead of is-enabled to check for firewalld
Browse files Browse the repository at this point in the history
Need to test if firewalld is running - the is-active test is
for that, not is-enabled

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
  • Loading branch information
richm committed Aug 20, 2024
1 parent 1cba1db commit d739c27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/tasks/create_test_interfaces_with_dhcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
ip link set {{ dhcp_interface1 }}p master testbr
ip link set {{ dhcp_interface2 }}p master testbr
# Run joint DHCP4/DHCP6 server with RA enabled in veth namespace
if systemctl is-enabled firewalld; then
if systemctl is-active firewalld; then
for service in dhcp dhcpv6 dhcpv6-client; do
if ! firewall-cmd --query-service="$service"; then
firewall-cmd --add-service "$service"
Expand Down
2 changes: 1 addition & 1 deletion tests/tasks/remove_test_interfaces_with_dhcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
service radvd stop
iptables -D INPUT -i testbr -p udp --dport 67:68 --sport 67:68 -j ACCEPT
fi
if systemctl is-enabled firewalld; then
if systemctl is-active firewalld; then
for service in dhcp dhcpv6 dhcpv6-client; do
if firewall-cmd --query-service="$service"; then
firewall-cmd --remove-service "$service"
Expand Down

0 comments on commit d739c27

Please sign in to comment.