diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 88411e02..eaeb50ca 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -935,15 +935,6 @@ readSetupVarsIfPresent() { fi } -printSetupVars() { - # Currently debug test function only - echo "piholeInterface=${piholeInterface}" - echo "IPv4addr=${IPv4addr}" - echo "piholeIPv6=${piholeIPv6}" - echo "piholeDNS1=${piholeDNS1}" - echo "piholeDNS2=${piholeDNS2}" -} - # Start the installer readSetupVarsIfPresent "${1}" diff --git a/test/test_automated_install.py b/test/test_automated_install.py index 7d204197..d85b2537 100644 --- a/test/test_automated_install.py +++ b/test/test_automated_install.py @@ -26,6 +26,16 @@ def test_setupVars_are_sourced_to_global_scope(Pihole): script = dedent('''#!/bin/bash -e . /opt/pihole/stub_basic-install.sh readSetupVarsIfPresent pihole + + printSetupVars() { + # Currently debug test function only + echo "piholeInterface=\${piholeInterface}" + echo "IPv4addr=\${IPv4addr}" + echo "piholeIPv6=\${piholeIPv6}" + echo "piholeDNS1=\${piholeDNS1}" + echo "piholeDNS2=\${piholeDNS2}" + } + printSetupVars''') write_test_script(Pihole, script) @@ -58,4 +68,4 @@ def test_setupVars_saved_to_file(Pihole): def write_test_script(Pihole, script): Pihole.run('cat < /test\n{}\nEOF'.format(script)) Pihole.run('chmod +x /test') - #print Pihole.run('cat /test; ls -lat /test').stdout + print Pihole.run('cat /test; ls -lat /test').stdout