From 792b0d419b20875dab023e311d532318f80ab2ff Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Thu, 1 Jun 2023 19:29:47 +0100 Subject: [PATCH] Test fixes Signed-off-by: Adam Warner --- automated install/basic-install.sh | 13 ------------- test/test_any_automated_install.py | 27 --------------------------- test/test_any_utils.py | 2 +- 3 files changed, 1 insertion(+), 41 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index a6f6b865..6663bbad 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1566,17 +1566,6 @@ create_pihole_user() { fi } -finalExports() { - # shellcheck source=advanced/Scripts/webpage.sh - source "${PI_HOLE_LOCAL_REPO}/advanced/Scripts/webpage.sh" - - # Look for DNS server settings which would have to be reapplied - ProcessDNSSettings - - # Look for DHCP server settings which would have to be reapplied - ProcessDHCPSettings -} - # Install the logrotate script installLogrotate() { local str="Installing latest logrotate script" @@ -1649,8 +1638,6 @@ installPihole() { # install a man page entry for pihole install_manpage - - finalExports } # SELinux diff --git a/test/test_any_automated_install.py b/test/test_any_automated_install.py index 07a18100..3626ce6f 100644 --- a/test/test_any_automated_install.py +++ b/test/test_any_automated_install.py @@ -781,30 +781,3 @@ def test_package_manager_has_web_deps(host): assert "No package" not in output.stdout assert output.rc == 0 - - -def test_webpage_sh_valid_domain(host): - """Confirms checkDomain function in webpage.sh works as expected""" - check1 = host.run( - """ - source /opt/pihole/webpage.sh - checkDomain "pi-hole.net" - """ - ) - check2 = host.run( - """ - source /opt/pihole/webpage.sh - checkDomain "ab.pi-hole.net" - """ - ) - - check3 = host.run( - """ - source /opt/pihole/webpage.sh - checkDomain "abc.pi-hole.net" - """ - ) - - assert "pi-hole.net" in check1.stdout - assert "ab.pi-hole.net" in check2.stdout - assert "abc.pi-hole.net" in check3.stdout diff --git a/test/test_any_utils.py b/test/test_any_utils.py index efab3760..1efd77c3 100644 --- a/test/test_any_utils.py +++ b/test/test_any_utils.py @@ -151,4 +151,4 @@ def test_getFTLConfigValue_getFTLConfigValue(host): """ ) - assert '[ "9.9.9.9" ]' in output.stdout + assert '[ 9.9.9.9 ]' in output.stdout