1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-18 06:08:21 +00:00

Update test rig for new firewalld

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
Dan Schaper 2016-12-29 16:11:13 -08:00
parent a4a9879643
commit a48518d234
No known key found for this signature in database
GPG Key ID: 572E999E385B7BFC

View File

@ -71,13 +71,11 @@ def test_configureFirewall_firewalld_no_errors(Pihole):
source /opt/pihole/basic-install.sh source /opt/pihole/basic-install.sh
configureFirewall configureFirewall
''') ''')
expected_stdout = '::: Configuring firewalld for httpd and dnsmasq.' expected_stdout = '::: Configuring FirewallD for httpd and dnsmasq.'
assert expected_stdout in configureFirewall.stdout assert expected_stdout in configureFirewall.stdout
firewall_calls = Pihole.run('cat /var/log/firewall-cmd').stdout firewall_calls = Pihole.run('cat /var/log/firewall-cmd').stdout
assert 'firewall-cmd --state' in firewall_calls assert 'firewall-cmd --state' in firewall_calls
assert 'firewall-cmd --permanent --add-port=80/tcp' in firewall_calls assert 'firewall-cmd --permanent --add-port=80/tcp --add-port=53/tcp --add-port=53/udp' in firewall_calls
assert 'firewall-cmd --permanent --add-port=53/tcp' in firewall_calls
assert 'firewall-cmd --permanent --add-port=53/udp' in firewall_calls
assert 'firewall-cmd --reload' in firewall_calls assert 'firewall-cmd --reload' in firewall_calls