From c490343442018deca1f21d513c9c45521c850e8e Mon Sep 17 00:00:00 2001 From: shockrah Date: Mon, 27 Jul 2020 15:43:41 -0700 Subject: [PATCH] list_all_channels now serves as a good template to use for other funcs to follow suit --- server/tests/verify_basic_cases.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server/tests/verify_basic_cases.sh b/server/tests/verify_basic_cases.sh index 2b0203b..8a5291b 100644 --- a/server/tests/verify_basic_cases.sh +++ b/server/tests/verify_basic_cases.sh @@ -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