-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d29d5d
commit d0fddb2
Showing
4 changed files
with
70 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
. /usr/src/upgrade-test-scripts/env_setup.sh | ||
|
||
# Start the chain in the background | ||
/usr/src/upgrade-test-scripts/start_agd.sh & | ||
|
||
# wait for blocks to start being produced | ||
waitForBlock 1 | ||
|
||
# bring back chain process to foreground | ||
wait |
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,25 @@ | ||
#!/bin/bash | ||
|
||
# # Borrowed from https://github.com/DCFoundation/cosmos-proposal-builder/blob/main/.github/workflows/pr.yml#L43-L61 | ||
# # This script waits for the Agoric service to be fully ready before running the tests. | ||
# # It does so by polling the `/abci_info` endpoint of the Agoric service until the last block height is greater than or equal to the target height. | ||
|
||
|
||
timeout 300 bash -c ' | ||
TARGET_HEIGHT='$TARGET_HEIGHT' | ||
SLEEP=10 | ||
echo "Waiting for the Agoric service to be fully ready..." | ||
echo "Target block height: $TARGET_HEIGHT" | ||
RPC=http://localhost:26657 | ||
while true; do | ||
response=$(curl --silent $RPC/abci_info) | ||
height=$(echo $response | jq -r ".result.response.last_block_height | tonumber") | ||
if [ "$height" -ge $TARGET_HEIGHT ]; then | ||
echo "Service is ready! Last block height: $height" | ||
break | ||
else | ||
echo "Waiting for last block height to reach $TARGET_HEIGHT. Current height: $height" | ||
fi | ||
sleep $SLEEP | ||
done | ||
' |