reset ENV before tests

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2020-12-31 22:43:33 +01:00
parent ddb2785f8b
commit d13e95ada9
2 changed files with 10 additions and 6 deletions

View File

@ -5,7 +5,7 @@
# #
# Description: run all tests, exit after failed test # Description: run all tests, exit after failed test
# #
#### $$VERSION$$ v1.21-dev-25-gd496639 #### $$VERSION$$ v1.21-dev-45-gddb2785
############################################################# #############################################################
# magic to ensure that we're always inside the root of our application, # magic to ensure that we're always inside the root of our application,
@ -67,8 +67,8 @@ if [ "$fail" -eq 0 ]; then
else else
/bin/echo -n 'FAILURE ' /bin/echo -n 'FAILURE '
exitcode=1 exitcode=1
rm -rf "${TESTENV}/test" #rm -rf "${TESTENV}/test"
find "${TESTENV}/"* ! -name '[a-z]-*' -delete #find "${TESTENV}/"* ! -name '[a-z]-*' -delete
fi fi
######################### #########################

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#### $$VERSION$$ v1.21-dev-26-gbe87ba3 #### $$VERSION$$ v1.21-dev-45-gddb2785
# common variables # common variables
export TESTME DIRME TESTDIR LOGFILE REFDIR TESTNAME export TESTME DIRME TESTDIR LOGFILE REFDIR TESTNAME
@ -33,9 +33,13 @@ export INPUTFILE REFFILE INPUTFILE2 REFFILE2 OUTPUTFILE
INPUTFILE2="${DIRME}/${REFDIR}/${REFDIR}2.input" INPUTFILE2="${DIRME}/${REFDIR}/${REFDIR}2.input"
REFFILE2="${DIRME}/${REFDIR}/${REFDIR}2.result" REFFILE2="${DIRME}/${REFDIR}/${REFDIR}2.result"
# do not query telegram when testing # reset ENVIRONMENT
export BASHBOT_URL TESTTOKEN BOTTOKEN export BASHBOT_URL TESTTOKEN BOTTOKEN BASHBOT_HOME BASHBOT_VAR BASHBOT_ETC
BOTTOKEN="" BOTTOKEN=""
BASHBOT_HOME=""
BASHBOT_VAR=""
BASHBOT_ETC=""
# do not query telegram when testing
BASHBOT_URL="https://my-json-server.typicode.com/topkecleon/telegram-bot-bash/getMe?" BASHBOT_URL="https://my-json-server.typicode.com/topkecleon/telegram-bot-bash/getMe?"
TESTTOKEN="123456789:BASHBOTTESTSCRIPTbashbottestscript_" TESTTOKEN="123456789:BASHBOTTESTSCRIPTbashbottestscript_"