more testing for channel list
This commit is contained in:
parent
2b70d37370
commit
1eab32889a
@ -13,3 +13,5 @@ export url='localhost:8888'
|
|||||||
export GET='-X GET'
|
export GET='-X GET'
|
||||||
export POST='-X POST'
|
export POST='-X POST'
|
||||||
|
|
||||||
|
export arrows='>>>>>'
|
||||||
|
export line='============='
|
||||||
|
@ -5,8 +5,9 @@
|
|||||||
active_tests='list_all_channels'
|
active_tests='list_all_channels'
|
||||||
|
|
||||||
list_all_channels() { # TEST
|
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
|
curl $GET $url/channels/list -d $simple_key
|
||||||
|
echo '\n'$line
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z $1 ];then
|
if [ -z $1 ];then
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
#!/bin/sh
|
#!/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
|
||||||
|
Loading…
Reference in New Issue
Block a user