mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-12-28 12:50:44 +00:00
fix all test if BOTTOKEN is set
This commit is contained in:
parent
be87ba3e23
commit
d0f87169f4
@ -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_"
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user