#!/bin/bash active_tests='list_channels_no_key list_channels_bad_key' 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" } if [ -z $1 ];then for cmd in $active_tests;do $cmd done else for cmd in $@;do $cmd done fi