[FAB-8245] change first network according to the fix

fixed [FAB-8245], and fabric samples have to be changed accordingly.
currently, added support for both output formats.

Change-Id: I0cac063af44556d6a37f17b25abf20134032540f
Signed-off-by: nirro <nirro@il.ibm.com>
This commit is contained in:
nirro 2018-04-17 15:45:26 +03:00
parent 41f5ab839b
commit 2d6386c421
2 changed files with 11 additions and 0 deletions

View file

@ -157,6 +157,14 @@ function chaincodeQuery {
logr "Query of channel '$CHANNEL_NAME' on peer '$PEER_HOST' was successful"
set -e
return 0
else
# removed the string "Query Result" from peer chaincode query command result, as a result, have to support both options until the change is merged.
VALUE=$(cat log.txt | egrep '^[0-9]+$')
if [ $? -eq 0 -a "$VALUE" = "$1" ]; then
logr "Query of channel '$CHANNEL_NAME' on peer '$PEER_HOST' was successful"
set -e
return 0
fi
fi
echo -n "."
done

View file

@ -184,6 +184,9 @@ chaincodeQuery () {
set +x
test $res -eq 0 && VALUE=$(cat log.txt | awk '/Query Result/ {print $NF}')
test "$VALUE" = "$EXPECTED_RESULT" && let rc=0
# removed the string "Query Result" from peer chaincode query command result, as a result, have to support both options until the change is merged.
test $rc -ne 0 && VALUE=$(cat log.txt | egrep '^[0-9]+$')
test "$VALUE" = "$EXPECTED_RESULT" && let rc=0
done
echo
cat log.txt