-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-11207] Fix local integration tests
This change fixes override paths and matchers for host run integration tests. The scripts now also wait for the docker host to become available. Change-Id: Id9e7017641cc372c30fa13f831d5ff96fb5ea6c7 Signed-off-by: Troy Ronda <[email protected]>
- Loading branch information
Showing
12 changed files
with
70 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright SecureKey Technologies Inc. All Rights Reserved. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
function waitForCoreVMUp { | ||
# When dockerd handles chaincode operation, we need to wait for it to be ready | ||
# (it takes time to start due to chaincode compilation). | ||
if [[ "${CORE_VM_ENDPOINT}" =~ http://(.*):(.*) ]]; then | ||
declare attempt=0 | ||
declare host=${BASH_REMATCH[1]} | ||
declare port=${BASH_REMATCH[2]} | ||
|
||
if [ "${TEST_LOCAL}" = true ]; then | ||
host="localhost" | ||
fi | ||
|
||
echo "Waiting for VM endpoint to listen [${host}:${port}]..." | ||
while true; do | ||
if [ ${attempt} -gt 120 ]; then | ||
echo "VM endpoint not listening after ${attempt} attempts" | ||
exit 1 | ||
fi | ||
|
||
alive=$(curl -s --head --request GET ${host}:${port}/info || true) | ||
if [[ "${alive}" =~ ^HTTP/(.*)200 ]]; then | ||
break | ||
fi | ||
|
||
sleep 1 | ||
attempt=$((attempt + 1)) | ||
done | ||
echo "VM endpoint is listening after ${attempt} attempts" | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters