From e0e88fdb52f0dd87f39575170e586c33c80f0176 Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Tue, 24 Jan 2017 11:58:22 -0800 Subject: [PATCH] Start IPTables test, get baseline for commands in the container. See what we have to mock to start testing. --- test/test_automated_install.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/test_automated_install.py b/test/test_automated_install.py index 8ecba458..4864e4a2 100644 --- a/test/test_automated_install.py +++ b/test/test_automated_install.py @@ -105,6 +105,15 @@ def test_configureFirewall_firewalld_enabled_declined_no_errors(Pihole): expected_stdout = 'Not installing firewall rulesets.' assert expected_stdout in configureFirewall.stdout +def test_configureFirewall_iptables_baseline(Pihole): + ''' confirms IPTables rules are not applied when firewallD is not running ''' + configureFirewall = Pihole.run(''' + source /opt/pihole/basic-install.sh + configureFirewall + ''') + expected_stdout = 'Filler Text' + assert expected_stdout in configureFirewall.stdout + # Helper functions 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 '''