docker-compose-files/hyperledger_fabric/latest/scripts/test_cc_queryinstalled.sh

23 lines
569 B
Bash
Raw Normal View History

2019-04-22 14:19:18 +08:00
#!/bin/bash
# Importing useful functions for cc testing
if [ -f ./func.sh ]; then
source ./func.sh
elif [ -f scripts/func.sh ]; then
source scripts/func.sh
fi
2019-10-01 05:11:37 +08:00
## Query the installed chaincode on all peers
echo_b "=== Query Chaincode installed on all organizations ... ==="
2019-04-22 14:19:18 +08:00
for org in "${ORGS[@]}"
do
t="\${ORG${org}_PEER0_URL}" && peer_url=`eval echo $t`
t="\${ORG${org}_PEER0_TLS_ROOTCERT}" && peer_tls_rootcert=`eval echo $t`
2019-10-01 05:11:37 +08:00
chaincodeQueryInstalled "$org" 0 ${peer_url} ${peer_tls_rootcert}
2019-04-22 14:19:18 +08:00
done
2019-10-01 05:11:37 +08:00
echo_g "=== Query Chaincode installed status done ==="
2019-04-22 14:19:18 +08:00
echo