list_all_channels now serves as a good template to use for other funcs to follow suit

This commit is contained in:
shockrah 2020-07-27 15:43:41 -07:00
parent fb63007a85
commit c490343442

View File

@ -1,23 +1,23 @@
#!/bin/sh
#!/bin/bash
# Available tests marked with `TEST`
# Available tests marked with `TEST` - ez grep usage
active_tests='list_all_channels'
list_all_channels() { # TEST
echo $arrows Test: list_all_channels : ...
curl $GET $url/channels/list -d $simple_key
echo '\n'$line
result=$(curl --silent -i $GET $url/channels/list -d $simple_key)
code=$(echo "$result" | grep HTTP\/1.1 | awk '{print $2}')
echo "good_list_all_channels" 200 $code
show_discrepancy 200 $code "$result"
}
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
echo '\n'$?
done
fi