Skip to content

Commit

Permalink
[FAB-8245] change first network according to the fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
nirrozenbaum committed Apr 17, 2018
1 parent 41f5ab8 commit 2d6386c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fabric-ca/scripts/run-fabric.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions first-network/scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2d6386c

Please sign in to comment.