Last of the IPTables tests, new test rig is operating.

This commit is contained in:
Dan Schaper 2017-01-24 20:09:10 -08:00
parent b16f797317
commit 0bbe0aed83
No known key found for this signature in database
GPG Key ID: 572E999E385B7BFC
1 changed files with 2 additions and 1 deletions

View File

@ -163,8 +163,9 @@ def test_configureFirewall_IPTables_enabled_not_exist_no_errors(Pihole):
expected_stdout = 'Installing new IPTables firewall rulesets'
assert expected_stdout in configureFirewall.stdout
firewall_calls = Pihole.run('cat /var/log/iptables').stdout
# Only check the first rule, since iptables returns a 1 from the mock command.
assert 'iptables -I INPUT 1 -p tcp -m tcp --dport 80 -j ACCEPT' in firewall_calls
assert 'iptables -I INPUT 1 -p tcp -m tcp --dport 53 -j ACCEPT' in firewall_calls
assert 'iptables -I INPUT 1 -p udp -m udp --dport 53 -j ACCEPT' in firewall_calls
# Helper functions
def mock_command(script, args, container):