mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 12:40:56 +00:00
Revert second test.
This commit is contained in:
parent
f1cfb16bf9
commit
9c7f7756b4
@ -79,16 +79,6 @@ def test_configureFirewall_firewalld_running_no_errors(Pihole):
|
|||||||
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=80/tcp --add-port=53/tcp --add-port=53/udp' in firewall_calls
|
||||||
assert 'firewall-cmd --reload' in firewall_calls
|
assert 'firewall-cmd --reload' in firewall_calls
|
||||||
|
|
||||||
def test_configureFirewall_firewalld_disabled_no_errors(Pihole):
|
|
||||||
''' confirms firewalld rules are applied when appropriate '''
|
|
||||||
mock_command('firewall-cmd', 'stopped', '0', Pihole)
|
|
||||||
configureFirewall = Pihole.run('''
|
|
||||||
source /opt/pihole/basic-install.sh
|
|
||||||
configureFirewall
|
|
||||||
''')
|
|
||||||
expected_stdout = 'No active firewall detected.. skipping firewall configuration.'
|
|
||||||
assert expected_stdout in configureFirewall.stdout
|
|
||||||
|
|
||||||
# Helper functions
|
# Helper functions
|
||||||
def mock_command(script, result, retVal, container):
|
def mock_command(script, result, retVal, container):
|
||||||
''' Allows for setup of commands we don't really want to have to run for real in unit tests '''
|
''' Allows for setup of commands we don't really want to have to run for real in unit tests '''
|
||||||
|
Loading…
Reference in New Issue
Block a user