diff --git a/server/tests/verify_err_cases.sh b/server/tests/verify_err_cases.sh deleted file mode 100644 index 655af73..0000000 --- a/server/tests/verify_err_cases.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -active_tests='list_channels_no_key list_channels_bad_key delete_channel_missing_param delete_channel_no_channel' - -list_channels_no_key() { - result=$($crl $GET $url/channels/list) - code=$(echo "$result" | grep HTTP\/1.1 | awk '{print $2}') - log_result list_channels_no_key 401 $code "$result" -} - -list_channels_bad_key() { - result=$($crl $GET $url/channels/list -d '{"secret":"something else"}') - code=$(echo "$result" | grep HTTP\/1.1 | awk '{print $2}') - log_result list_channels_bad_key 401 $code "$result" -} - -delete_channel_missing_param() { - kv="{\"id\":$id, \"secret\":\"$secret\"}" - result=$($crl $POST $url/channels/delete -d "$kv") - code=$(echo "$result" | grep HTTP\/1.1 | awk '{print $2}') - log_result delete_channel_missing_param 400 $code "$result" -} - -delete_channel_no_channel() { - # Should 200 as the api just drops the result - kv="{\"id\":$id, \"secret\":\"$secret\", \"name\":\"yes\"}" - result=$($crl $POST $url/channels/delete -d "$kv") - code=$(echo "$result" | grep HTTP\/1.1 | awk '{print $2}') - log_result delete_channel_no_channel_found 200 $code "$result" -} - -# Dispatcher to run our tests -if [ -z $1 ];then - for cmd in $active_tests;do - $cmd - done -else - for cmd in $@;do - $cmd - done -fi