test_cc_peer0.sh 603 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. # Importing useful functions for cc testing
  3. if [ -f ./func.sh ]; then
  4. source ./func.sh
  5. elif [ -f scripts/func.sh ]; then
  6. source scripts/func.sh
  7. fi
  8. echo_b "Channel name: "${APP_CHANNEL}
  9. echo_b "Query the existing value of a"
  10. chaincodeQuery ${APP_CHANNEL} 0 ${CC_NAME} ${CC_QUERY_ARGS} 100
  11. sleep 1
  12. echo_b "Invoke a transaction to transfer 10 from a to b"
  13. chaincodeInvoke ${APP_CHANNEL} 0 ${CC_NAME} ${CC_INVOKE_ARGS}
  14. sleep 1
  15. echo_b "Check if the result of a is 90"
  16. chaincodeQuery ${APP_CHANNEL} 0 ${CC_NAME} ${CC_QUERY_ARGS} 90
  17. echo
  18. echo_g "All GOOD, MVE Test completed"
  19. echo
  20. exit 0