docker-compose-files/hyperledger_fabric/v1.0.0/scripts/test_cc_peer0.sh

27 lines
659 B
Bash
Raw Normal View History

2017-04-14 12:08:18 +08:00
#!/bin/bash
2017-08-23 12:45:55 +08:00
# Importing useful functions for cc testing
if [ -f ./func.sh ]; then
source ./func.sh
elif [ -f scripts/func.sh ]; then
source scripts/func.sh
2017-07-10 17:24:19 +08:00
fi
2017-06-14 13:30:12 +08:00
echo_b "Channel name : "$CHANNEL_NAME
2017-04-14 12:08:18 +08:00
2017-09-01 20:18:46 +08:00
echo_b "====================Query the existing value of a===================================="
2017-08-25 13:02:44 +08:00
chaincodeQuery 0 100
2017-04-14 12:08:18 +08:00
2017-09-01 20:18:46 +08:00
echo_b "=====================Invoke a transaction to transfer 10 from a to b=================="
2017-08-25 13:02:44 +08:00
chaincodeInvoke 0
2017-04-14 12:08:18 +08:00
sleep 2
2017-09-01 20:18:46 +08:00
echo_b "=====================Check if the result of a is 90==================================="
2017-08-25 13:02:44 +08:00
chaincodeQuery 0 90
2017-04-14 12:08:18 +08:00
echo
2017-09-01 20:18:46 +08:00
echo_g "=====================All GOOD, MVE Test completed ===================== "
2017-04-14 12:08:18 +08:00
echo
exit 0