@@ -21,52 +21,50 @@ docker run --name microfab \
21
21
-e MICROFAB_CONFIG=" ${MICROFAB_CONFIG} " \
22
22
-e FABRIC_LOGGING_SPEC=info \
23
23
ghcr.io/hyperledger-labs/microfab
24
+ timeout 60s bash -c ' docker logs -f microfab | grep --max-count=1 "Microfab started"'
24
25
25
-
26
- sleep 10
27
-
28
- curl -sSL http://console.localho.st:8080/ak/api/v1/components > $CFG /cfg.json
26
+ curl -sSL http://console.localho.st:8080/ak/api/v1/components > $CFG /cfg.json
29
27
npx @hyperledger-labs/weft microfab -w $CFG /_wallets -p $CFG /_gateways -m $CFG /_msp -f --config $CFG /cfg.json
30
28
31
29
# bring in the helper bash scripts
32
30
. $DIR /scripts/ccutils.sh
33
31
34
32
35
33
function deployCC() {
36
- # # package the chaincode
37
- packageChaincode
34
+ # # package the chaincode
35
+ packageChaincode
38
36
39
- # # Install chaincode on peer0.org1 and peer0.org2
40
- infoln " Installing chaincode on peer0.org1..."
41
- installChaincode 1
42
- infoln " Install chaincode on peer0.org2..."
43
- installChaincode 2
37
+ # # Install chaincode on peer0.org1 and peer0.org2
38
+ infoln " Installing chaincode on peer0.org1..."
39
+ installChaincode 1
40
+ infoln " Install chaincode on peer0.org2..."
41
+ installChaincode 2
44
42
45
- # # query whether the chaincode is installed
46
- queryInstalled 1
43
+ # # query whether the chaincode is installed
44
+ queryInstalled 1
47
45
48
- # # approve the definition for org1
49
- approveForMyOrg 1
46
+ # # approve the definition for org1
47
+ approveForMyOrg 1
50
48
51
- # # check whether the chaincode definition is ready to be committed
52
- # # expect org1 to have approved and org2 not to
53
- checkCommitReadiness 1 " \" org1MSP\" : true" " \" org2MSP\" : false"
54
- checkCommitReadiness 2 " \" org1MSP\" : true" " \" org2MSP\" : false"
49
+ # # check whether the chaincode definition is ready to be committed
50
+ # # expect org1 to have approved and org2 not to
51
+ checkCommitReadiness 1 " \" org1MSP\" : true" " \" org2MSP\" : false"
52
+ checkCommitReadiness 2 " \" org1MSP\" : true" " \" org2MSP\" : false"
55
53
56
- # # now approve also for org2
57
- approveForMyOrg 2
54
+ # # now approve also for org2
55
+ approveForMyOrg 2
58
56
59
- # # check whether the chaincode definition is ready to be committed
60
- # # expect them both to have approved
61
- checkCommitReadiness 1 " \" org1MSP\" : true" " \" org2MSP\" : true"
62
- checkCommitReadiness 2 " \" org1MSP\" : true" " \" org2MSP\" : true"
57
+ # # check whether the chaincode definition is ready to be committed
58
+ # # expect them both to have approved
59
+ checkCommitReadiness 1 " \" org1MSP\" : true" " \" org2MSP\" : true"
60
+ checkCommitReadiness 2 " \" org1MSP\" : true" " \" org2MSP\" : true"
63
61
64
- # # now that we know for sure both orgs have approved, commit the definition
65
- commitChaincodeDefinition 1 2
62
+ # # now that we know for sure both orgs have approved, commit the definition
63
+ commitChaincodeDefinition 1 2
66
64
67
- # # query on both orgs to see that the definition committed successfully
68
- queryCommitted 1
69
- queryCommitted 2
65
+ # # query on both orgs to see that the definition committed successfully
66
+ queryCommitted 1
67
+ queryCommitted 2
70
68
}
71
69
# ./gradlew -I ./chaincode-init.gradle -PchaincodeRepoDir=$(realpath ./fabric-chaincode-integration-test/src/contracts/fabric-ledger-api/repository) publishShimPublicationToFabricRepository
72
70
0 commit comments