mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-22 17:45:10 +00:00
[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:
parent
41f5ab839b
commit
2d6386c421
2 changed files with 11 additions and 0 deletions
|
|
@ -157,6 +157,14 @@ function chaincodeQuery {
|
||||||
logr "Query of channel '$CHANNEL_NAME' on peer '$PEER_HOST' was successful"
|
logr "Query of channel '$CHANNEL_NAME' on peer '$PEER_HOST' was successful"
|
||||||
set -e
|
set -e
|
||||||
return 0
|
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
|
fi
|
||||||
echo -n "."
|
echo -n "."
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -184,6 +184,9 @@ chaincodeQuery () {
|
||||||
set +x
|
set +x
|
||||||
test $res -eq 0 && VALUE=$(cat log.txt | awk '/Query Result/ {print $NF}')
|
test $res -eq 0 && VALUE=$(cat log.txt | awk '/Query Result/ {print $NF}')
|
||||||
test "$VALUE" = "$EXPECTED_RESULT" && let rc=0
|
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
|
done
|
||||||
echo
|
echo
|
||||||
cat log.txt
|
cat log.txt
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue