option to always show body of response added
This commit is contained in:
parent
b5041a4f8d
commit
b6db34f28f
@ -10,6 +10,7 @@
|
|||||||
# 1. is properly formatted
|
# 1. is properly formatted
|
||||||
# 2. has all the info we need & none we don't
|
# 2. has all the info we need & none we don't
|
||||||
# 3. has basically nothing malicious about it
|
# 3. has basically nothing malicious about it
|
||||||
|
|
||||||
log_result() {
|
log_result() {
|
||||||
name=$1
|
name=$1
|
||||||
expect=$2
|
expect=$2
|
||||||
@ -26,9 +27,18 @@ log_result() {
|
|||||||
echo -e ${red}==========${nc}
|
echo -e ${red}==========${nc}
|
||||||
else
|
else
|
||||||
echo -e ${green}${name}${nc} $expect $actual
|
echo -e ${green}${name}${nc} $expect $actual
|
||||||
|
if [ ! -z "$_show_body" ];then
|
||||||
|
echo ==========
|
||||||
|
echo "$result" | sed 's/^/\t/g'
|
||||||
|
echo ==========
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ "$1" = "body" ];then
|
||||||
|
export _show_body=1
|
||||||
|
fi
|
||||||
|
|
||||||
source ./common.sh
|
source ./common.sh
|
||||||
export -f log_result
|
export -f log_result
|
||||||
echo TestName ExpectedCode ActualCode
|
echo TestName ExpectedCode ActualCode
|
||||||
|
Loading…
Reference in New Issue
Block a user