2018-08-22 17:27:45 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Importing useful functions for cc testing
|
|
|
|
if [ -f ./func.sh ]; then
|
2021-03-04 06:06:06 +08:00
|
|
|
source ./func.sh
|
2018-08-22 17:27:45 +08:00
|
|
|
elif [ -f scripts/func.sh ]; then
|
2021-03-04 06:06:06 +08:00
|
|
|
source scripts/func.sh
|
2018-08-22 17:27:45 +08:00
|
|
|
fi
|
|
|
|
|
2019-12-06 02:47:21 +08:00
|
|
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
|
|
|
CC_INVOKE_ARGS=${CC_INVOKE_ARGS:-$CC_02_INVOKE_ARGS}
|
|
|
|
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
|
|
|
|
|
2018-08-22 17:27:45 +08:00
|
|
|
# test sideDB feature
|
|
|
|
|
|
|
|
#chaincodeInstantiate "${APP_CHANNEL}" 1 0 ${CC_MARBLES_NAME} ${CC_INIT_VERSION} ${CC_MARBLES_INIT_ARGS} ${CC_MARBLES_COLLECTION_CONFIG}
|
|
|
|
|
|
|
|
# both org1 and org2 can invoke
|
2018-08-27 10:52:46 +08:00
|
|
|
#chaincodeInvoke ${APP_CHANNEL} 1 0 ${CC_MARBLES_NAME} ${CC_MARBLES_INVOKE_INIT_ARGS}
|
|
|
|
|
|
|
|
#chaincodeInvoke ${APP_CHANNEL} 1 0 ${CC_MARBLES_NAME} ${CC_MARBLES_INVOKE_INIT_ARGS}
|
|
|
|
|
|
|
|
#chaincodeQuery ${APP_CHANNEL} 1 0 ${CC_MARBLES_NAME} ${CC_MARBLES_QUERY_READPVTDETAILS_ARGS}
|
|
|
|
#chaincodeQuery ${APP_CHANNEL} 2 0 ${CC_MARBLES_NAME} ${CC_MARBLES_QUERY_READ_ARGS}
|
2019-12-06 02:47:21 +08:00
|
|
|
#chaincodeQuery 1 0 "${ORG1_PEER0_URL}" "${ORG1_PEER0_TLS_ROOTCERT}" ${APP_CHANNEL} ${CC_MARBLES_NAME} ${CC_MARBLES_QUERY_READPVTDETAILS_ARGS_2}
|
|
|
|
|
|
|
|
chaincodeQuery 1 0 "${ORG1_PEER0_URL}" "${ORG1_PEER0_TLS_ROOTCERT}" ${APP_CHANNEL} ${CC_NAME} ${CC_QUERY_ARGS} 80
|
|
|
|
|
2018-08-27 10:52:46 +08:00
|
|
|
exit
|