2
0

test_qscc.sh 752 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env bash
  2. # This script will run some qscc queries for testing.
  3. # Importing useful functions for cc testing
  4. if [ -f ./func.sh ]; then
  5. source ./func.sh
  6. elif [ -f scripts/func.sh ]; then
  7. source scripts/func.sh
  8. fi
  9. echo_b "QSCC testing"
  10. org=1
  11. peer=0
  12. echo_b "QSCC GetChainInfo"
  13. chaincodeQuery ${APP_CHANNEL} $org $peer qscc '{"Args":["GetChainInfo","'${APP_CHANNEL}'"]}'
  14. echo_b "QSCC GetBlockByNumber 2"
  15. chaincodeQuery ${APP_CHANNEL} $org $peer qscc '{"Args":["GetBlockByNumber","'${APP_CHANNEL}'","2"]}'
  16. #peer chaincode query \
  17. # -C "" \
  18. # -n qscc \
  19. # -c '{"Args":["GetChainInfo","'${APP_CHANNEL}'"]}'
  20. #peer chaincode query \
  21. # -C "" \
  22. # -n qscc \
  23. # -c '{"Args":["GetBlockByNumber","'${APP_CHANNEL}'","2"]}'
  24. echo_g "QSCC testing done!"