diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 534b194d..491f7b6d 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1149,6 +1149,6 @@ main() { echo "::: The install log is located at: /etc/pihole/install.log" } -if [[ "${PHTEST}" != "TRUE" ]] ; then +if [[ "${PH_TEST}" != true ]] ; then main "$@" fi diff --git a/test/centos.Dockerfile b/test/centos.Dockerfile index 9af7eb4d..00543b67 100644 --- a/test/centos.Dockerfile +++ b/test/centos.Dockerfile @@ -11,4 +11,6 @@ ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$SCRIPTDIR RUN true && \ chmod +x $SCRIPTDIR/* +ENV PH_TEST true + #sed '/# Start the installer/Q' /opt/pihole/basic-install.sh > /opt/pihole/stub_basic-install.sh && \ diff --git a/test/debian.Dockerfile b/test/debian.Dockerfile index b80d6155..931c0ba7 100644 --- a/test/debian.Dockerfile +++ b/test/debian.Dockerfile @@ -8,8 +8,9 @@ ADD . $GITDIR RUN cp $GITDIR/advanced/Scripts/*.sh $GITDIR/gravity.sh $GITDIR/pihole $GITDIR/automated\ install/*.sh $SCRIPTDIR/ ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$SCRIPTDIR - RUN true && \ chmod +x $SCRIPTDIR/* +ENV PH_TEST true + #sed '/# Start the installer/Q' /opt/pihole/basic-install.sh > /opt/pihole/stub_basic-install.sh && \ diff --git a/test/test_automated_install.py b/test/test_automated_install.py index a3c80666..ee3beeee 100644 --- a/test/test_automated_install.py +++ b/test/test_automated_install.py @@ -53,7 +53,6 @@ def test_setupVars_saved_to_file(Pihole): set -e echo start TERM=xterm - PHTEST=TRUE source /opt/pihole/basic-install.sh {} finalExports @@ -69,7 +68,6 @@ def test_configureFirewall_firewalld_no_errors(Pihole): ''' confirms firewalld rules are applied when appopriate ''' mock_command('firewall-cmd', '0', Pihole) configureFirewall = Pihole.run(''' - PHTEST=TRUE source /opt/pihole/basic-install.sh configureFirewall ''')