From 65496ace200d51f68647ce4301f218ad81007cf8 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 22 Nov 2016 21:50:54 -0500 Subject: [PATCH] test: tmsp query result is json --- test/app/dummy_test.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/app/dummy_test.sh b/test/app/dummy_test.sh index bb17c6c31..c0907bd4d 100644 --- a/test/app/dummy_test.sh +++ b/test/app/dummy_test.sh @@ -26,7 +26,7 @@ echo "" RESPONSE=`tmsp-cli query $KEY` set +e -A=`echo $RESPONSE | grep exists=true` +A=`echo $RESPONSE | grep '"exists":true'` if [[ $? != 0 ]]; then echo "Failed to find 'exists=true' for $KEY. Response:" echo "$RESPONSE" @@ -37,7 +37,7 @@ set -e # we should not be able to look up the value RESPONSE=`tmsp-cli query $VALUE` set +e -A=`echo $RESPONSE | grep exists=true` +A=`echo $RESPONSE | grep '"exists":true'` if [[ $? == 0 ]]; then echo "Found 'exists=true' for $VALUE when we should not have. Response:" echo "$RESPONSE" @@ -54,7 +54,7 @@ RESPONSE=`curl -s 127.0.0.1:46657/tmsp_query?query=\"$(toHex $KEY)\"` RESPONSE=`echo $RESPONSE | jq .result[1].result.Data | xxd -r -p` set +e -A=`echo $RESPONSE | grep exists=true` +A=`echo $RESPONSE | grep '"exists":true'` if [[ $? != 0 ]]; then echo "Failed to find 'exists=true' for $KEY. Response:" echo "$RESPONSE" @@ -66,7 +66,7 @@ set -e RESPONSE=`curl -s 127.0.0.1:46657/tmsp_query?query=\"$(toHex $VALUE)\"` RESPONSE=`echo $RESPONSE | jq .result[1].result.Data | xxd -r -p` set +e -A=`echo $RESPONSE | grep exists=true` +A=`echo $RESPONSE | grep '"exists":true'` if [[ $? == 0 ]]; then echo "Found 'exists=true' for $VALUE when we should not have. Response:" echo "$RESPONSE"