mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 06:48:07 +00:00
move PH_TRUE to Dockerfiles to DRY
This commit is contained in:
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…
Reference in New Issue
Block a user