fix all test if BOTTOKEN is set

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2020-12-28 22:38:30 +01:00
parent be87ba3e23
commit d0f87169f4
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#### $$VERSION$$ v1.20-0-g2ab00a2
#### $$VERSION$$ v1.21-dev-26-gbe87ba3
# common variables
export TESTME DIRME TESTDIR LOGFILE REFDIR TESTNAME
@ -34,7 +34,8 @@ export INPUTFILE REFFILE INPUTFILE2 REFFILE2 OUTPUTFILE
REFFILE2="${DIRME}/${REFDIR}/${REFDIR}2.result"
# do not query telegram when testing
export BASHBOT_URL TESTTOKEN
export BASHBOT_URL TESTTOKEN BOTTOKEN
BOTTOKEN=""
BASHBOT_URL="https://my-json-server.typicode.com/topkecleon/telegram-bot-bash/getMe?"
TESTTOKEN="123456789:BASHBOTTESTSCRIPTbashbottestscript_"

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#### $$VERSION$$ v1.21-dev-25-gd496639
#### $$VERSION$$ v1.21-dev-26-gbe87ba3
# include common functions and definitions
# shellcheck source=test/ALL-tests.inc.sh
@ -10,7 +10,6 @@ TESTFILES="${TOKENFILE} ${ACLFILE} ${COUNTFILE} ${BLOCKEDFILE} ${ADMINFILE}"
set -e
# run bashbot first time with init
export BOTTOKEN=""
"${TESTDIR}/bashbot.sh" init >"${LOGFILE}" <<EOF
$TESTTOKEN
nobody