Use existing config in the CLI container
Some checks failed
Lint Checks / Run linter (pull_request) Successful in 56s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m57s
Webapp Test / Run webapp test suite (pull_request) Failing after 6m52s
Smoke Test / Run basic test suite (pull_request) Successful in 6m42s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 12m58s

This commit is contained in:
Prathamesh Musale 2024-04-01 20:10:29 +05:30
parent fbde144880
commit e8cacd899a

View File

@ -18,34 +18,14 @@ echo "$(date +"%Y-%m-%d %T"): Stack started"
# Verify that the fixturenet is up and running # Verify that the fixturenet is up and running
$TEST_TARGET_SO --stack fixturenet-laconicd deploy --cluster laconicd ps $TEST_TARGET_SO --stack fixturenet-laconicd deploy --cluster laconicd ps
# Get the key from laconicd
laconicd_key=$(docker exec laconicd-laconicd-1 sh -c 'yes | laconicd keys export mykey --unarmored-hex --unsafe')
# Get the fixturenet account address # Get the fixturenet account address
laconicd_account_address=$(docker exec laconicd-laconicd-1 laconicd keys list | awk '/- address:/ {print $3}') laconicd_account_address=$(docker exec laconicd-laconicd-1 laconicd keys list | awk '/- address:/ {print $3}')
# Set parameters for the test suite # Copy over config
cosmos_chain_id=laconic_9000-1 docker exec -it laconicd-cli-1 cp config.yml laconic-registry-cli/
laconicd_rest_endpoint=http://laconicd:1317
laconicd_gql_endpoint=http://laconicd:9473/api
# Create the required config and copy it over inside the container # Wait for the laconid endpoint to come up
config_file="config.yml" docker exec laconicd-laconicd-1 sh -c "curl --retry 10 --retry-delay 3 --retry-connrefused http://127.0.0.1:9473/api"
config=$(cat <<EOL
services:
cns:
restEndpoint: $laconicd_rest_endpoint
gqlEndpoint: $laconicd_gql_endpoint
userKey: $laconicd_key
bondId:
chainId: $cosmos_chain_id
gas: 200000
fees: 200000aphoton
EOL
)
echo "$config" > "$config_file"
docker cp $config_file laconicd-cli-1:laconic-registry-cli/config.yml
# Run the tests # Run the tests
docker exec -it -e TEST_ACCOUNT=$laconicd_account_address laconicd-cli-1 sh -c 'cd laconic-registry-cli && yarn test' docker exec -it -e TEST_ACCOUNT=$laconicd_account_address laconicd-cli-1 sh -c 'cd laconic-registry-cli && yarn test'