-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run registry CLI tests as part of laconicd fixturenet tests (#791)
Part of https://www.notion.so/Test-registry-cli-in-SO-fixturenet-laconicd-CI-ef1f497678264362931bd12643ba8a17 Co-authored-by: neeraj <[email protected]> Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/791 Co-authored-by: Prathamesh Musale <[email protected]> Co-committed-by: Prathamesh Musale <[email protected]>
- Loading branch information
1 parent
d2442bc
commit 105805c
Showing
5 changed files
with
47 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
Change this file to trigger running the fixturenet-laconicd-test CI job | ||
Trigger | ||
Trigger | ||
Trigger |
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 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then | ||
set -x | ||
fi | ||
|
||
echo "$(date +"%Y-%m-%d %T"): Running stack-orchestrator Laconic registry CLI tests" | ||
env | ||
cat /etc/hosts | ||
# Bit of a hack, test the most recent package | ||
TEST_TARGET_SO=$( ls -t1 ./package/laconic-so* | head -1 ) | ||
|
||
echo "$(date +"%Y-%m-%d %T"): Starting stack" | ||
TEST_AUCTION_ENABLED=true BASE_DIR=~/cerc $TEST_TARGET_SO --stack fixturenet-laconicd deploy --cluster laconicd up | ||
echo "$(date +"%Y-%m-%d %T"): Stack started" | ||
|
||
# Verify that the fixturenet is up and running | ||
$TEST_TARGET_SO --stack fixturenet-laconicd deploy --cluster laconicd ps | ||
|
||
# Get the fixturenet account address | ||
laconicd_account_address=$(docker exec laconicd-laconicd-1 laconicd keys list | awk '/- address:/ {print $3}') | ||
|
||
# Copy over config | ||
docker exec laconicd-cli-1 cp config.yml laconic-registry-cli/ | ||
|
||
# Wait for the laconid endpoint to come up | ||
echo "Waiting for the RPC endpoint to come up" | ||
docker exec laconicd-laconicd-1 sh -c "curl --retry 20 --retry-delay 3 --retry-connrefused http://127.0.0.1:9473/api" | ||
|
||
# Run the tests | ||
echo "Running the tests" | ||
docker exec -e TEST_ACCOUNT=$laconicd_account_address laconicd-cli-1 sh -c 'cd laconic-registry-cli && yarn && yarn test' | ||
|
||
# Clean up | ||
$TEST_TARGET_SO --stack fixturenet-laconicd deploy --cluster laconicd down --delete-volumes | ||
echo "$(date +"%Y-%m-%d %T"): Test finished" |
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