laconic-registry-cli/test/run-tests.sh
Nabarun aa2117e472
All checks were successful
Lint / lint (18.x) (pull_request) Successful in 1m7s
Tests / cli_tests (18.x) (pull_request) Successful in 8m27s
Upgrade registry-sdk package version (#70)
Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675)

- Resolves cerc-io/testnet-laconicd-stack#4 (comment)

Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Reviewed-on: #70
Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
2024-07-22 06:18:02 +00:00

38 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
set -e
set -u
# Wait for the laconid endpoint to come up
docker compose exec laconicd sh -c "curl --retry 10 --retry-delay 3 --retry-connrefused http://127.0.0.1:9473/api"
# Get the key from laconicd
laconicd_key=$(yes | docker compose exec laconicd laconicd keys export alice --keyring-backend test --unarmored-hex --unsafe)
# Get the fixturenet account address
laconicd_account_address=$(docker compose exec laconicd laconicd keys list --keyring-backend test | awk '/- address:/ {print $3}')
# Set parameters for the test suite
cosmos_chain_id=laconic_9000-1
laconicd_rpc_endpoint=http://127.0.0.1:26657
laconicd_gql_endpoint=http://127.0.0.1:9473/api
# Create the required config
config_file="config.yml"
config=$(cat <<EOL
services:
registry:
rpcEndpoint: $laconicd_rpc_endpoint
gqlEndpoint: $laconicd_gql_endpoint
userKey: $laconicd_key
bondId:
chainId: $cosmos_chain_id
gas: 200000
fees: 200000photon
EOL
)
echo "$config" > "$config_file"
# Run tests
TEST_ACCOUNT=$laconicd_account_address yarn test