more testing for channel list

This commit is contained in:
shockrah 2020-07-13 21:41:04 -07:00
parent 2b70d37370
commit 1eab32889a
3 changed files with 27 additions and 2 deletions

View File

@ -13,3 +13,5 @@ export url='localhost:8888'
export GET='-X GET'
export POST='-X POST'
export arrows='>>>>>'
export line='============='

View File

@ -5,8 +5,9 @@
active_tests='list_all_channels'
list_all_channels() { # TEST
#echo curl $GET $url/channels/list -d $simple_key
echo $arrows Test: list_all_channels : ...
curl $GET $url/channels/list -d $simple_key
echo '\n'$line
}
if [ -z $1 ];then

View File

@ -1,3 +1,25 @@
#!/bin/sh
echo Running err cases
active_tests='list_all_channels'
list_all_channels() {
echo $arrows Test: list_all_channels : no-key
curl $GET $url/channels/list
echo '\n'$line
echo $arrows Test: list_all_channels : wrong-key
curl $GET $url/channels/list -d '{"secret":"something else"}'
echo '\n'$line
}
if [ -z $1 ];then
. ./tests/common.sh
echo Running tests $active_tests
for cmd in $active_tests;do
$cmd
done
else
for cmd in $@;do
$cmd
done
fi