move PH_TRUE to Dockerfiles to DRY

pull/899/head
diginc 8 years ago
parent c2930b0ca5
commit b9f3493dbc

@ -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

@ -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 && \

@ -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 && \

@ -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
''')

Loading…
Cancel
Save