freechat/server/tests/verify_err_cases.sh
2020-07-13 21:41:04 -07:00

26 lines
449 B
Bash

#!/bin/sh
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