@@ -41,6 +41,10 @@ expectInvoke() {
4141 (cd " $TEST_TMP " && sh ../expect-invoke-cli.sh " $1 " " $2 " " $3 " " $4 " " $5 " " " )
4242}
4343
44+ expectQuery () {
45+ (cd " $TEST_TMP " && sh ../expect-query-cli.sh " $1 " " $2 " " $3 " " $4 " " $5 " )
46+ }
47+
4448expectCommand () {
4549 sh " $TEST_TMP /../expect-command.sh" " $1 " " $2 "
4650}
@@ -65,20 +69,20 @@ waitForContainer "peer1.org1.example.com" "Membership view has changed. peers we
6569expectInvoke " peer0.org1.example.com" " my-channel1" " chaincode1" \
6670 ' {"Args":["KVContract:put", "name", "Willy Wonka"]}' \
6771 ' {\"success\":\"OK\"}'
68- expectInvoke " peer1.org1.example.com" " my-channel1" " chaincode1" \
72+ expectQuery " peer1.org1.example.com" " my-channel1" " chaincode1" \
6973 ' {"Args":["KVContract:get", "name"]}' \
70- ' {\ "success\":\ "Willy Wonka\ "}'
74+ ' {"success": "Willy Wonka"}'
7175
7276# Verify channel query scripts
7377(cd " $TEST_TMP " && " $FABLO_HOME /fablo.sh" channel fetch newest my-channel1 org1 peer1)
74- expectCommand " cat \" $TEST_TMP /newest.block\" " " KVContract:get "
78+ expectCommand " cat \" $TEST_TMP /newest.block\" " " KVContract:put "
7579
7680(cd " $TEST_TMP " && " $FABLO_HOME /fablo.sh" channel fetch 3 my-channel1 org1 peer1 " another.block" )
7781expectCommand " cat \" $TEST_TMP /another.block\" " " KVContract:put"
7882
7983(cd " $TEST_TMP " && " $FABLO_HOME /fablo.sh" channel fetch config my-channel1 org1 peer1 " channel-config.json" )
8084expectCommand " cat \" $TEST_TMP /channel-config.json\" " " \" mod_policy\" : \" Admins\" ,"
8185
82- expectCommand " (cd \" $TEST_TMP \" && \" $FABLO_HOME /fablo.sh\" channel getinfo my-channel1 org1 peer1)" " \" height\" :5 "
86+ expectCommand " (cd \" $TEST_TMP \" && \" $FABLO_HOME /fablo.sh\" channel getinfo my-channel1 org1 peer1)" " \" height\" :4 "
8387
8488echo " 🎉 Test passed! 🎉"
0 commit comments