Skip to content

Commit 5133f89

Browse files
committed
wait for chaincode containers
Signed-off-by: Jakub Dzikowski <jakub.t.dzikowski@gmail.com>
1 parent cf83505 commit 5133f89

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

e2e-network/docker/test-04-v3-snapshot-ccaas.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ waitForContainer "ca.org1.example.com" "Listening on https://0.0.0.0:7054"
5656
waitForContainer "couchdb.peer0.org1.example.com" "Apache CouchDB has started. Time to relax."
5757
waitForContainer "peer0.org1.example.com" "Joining gossip network of channel my-channel1 with 1 organizations"
5858
waitForChaincode "peer0.org1.example.com" "my-channel1" "chaincode1" "0.0.1"
59+
waitForContainer "ccaas_peer0.org1.example.com_my-channel1_chaincode1_0.0.1" "Bootstrap process completed"
60+
waitForContainer "ccaas_peer0.org1.example.com_my-channel2_chaincode1_0.0.1" "Bootstrap process completed"
5961

6062
fablo_rest_org1="localhost:8801"
6163
snapshot_name="fablo-snapshot-$(date -u +"%Y%m%d%H%M%S")"
@@ -109,14 +111,17 @@ hook_command="perl -i -pe 's/FABRIC_VERSION=2\.3\.3/FABRIC_VERSION=2\.4\.2/g' ./
109111
cd "$TEST_TMP" &&
110112
"$FABLO_HOME/fablo.sh" prune &&
111113
"$FABLO_HOME/fablo.sh" restore "$snapshot_name" "$hook_command" &&
112-
"$FABLO_HOME/fablo.sh" start
114+
"$FABLO_HOME/fablo.sh" start &&
113115
"$FABLO_HOME/fablo.sh" chaincodes install
114116
)
115117

116118
waitForChaincode "peer0.org1.example.com" "my-channel1" "chaincode1" "0.0.1"
117119

118-
sleep 10
120+
# wait for CCAAS container to finish bootstrapping
121+
waitForContainer "ccaas_peer0.org1.example.com_my-channel1_chaincode1_0.0.1" "Bootstrap process completed"
122+
waitForContainer "ccaas_peer0.org1.example.com_my-channel2_chaincode1_0.0.1" "Bootstrap process completed"
119123

124+
# check if state is kept after restoration
120125
user_token_response="$(expectCARest "$fablo_rest_org1/user/enroll" '' '{"id": "gordon", "secret": "gordonpw"}' 'token')"
121126
echo "$user_token_response"
122127
user_token="$(echo "$user_token_response" | jq -r '.token')"

0 commit comments

Comments
 (0)