From e8cacd899a60bdd3a0e9f2705e54d77ff178173e Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Mon, 1 Apr 2024 20:10:29 +0530 Subject: [PATCH] Use existing config in the CLI container --- tests/fixturenet-laconicd/run-cli-test.sh | 28 ++++------------------- 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/tests/fixturenet-laconicd/run-cli-test.sh b/tests/fixturenet-laconicd/run-cli-test.sh index 79275cde..408ad79b 100755 --- a/tests/fixturenet-laconicd/run-cli-test.sh +++ b/tests/fixturenet-laconicd/run-cli-test.sh @@ -18,34 +18,14 @@ 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 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 laconicd_account_address=$(docker exec laconicd-laconicd-1 laconicd keys list | awk '/- address:/ {print $3}') -# Set parameters for the test suite -cosmos_chain_id=laconic_9000-1 -laconicd_rest_endpoint=http://laconicd:1317 -laconicd_gql_endpoint=http://laconicd:9473/api +# Copy over config +docker exec -it laconicd-cli-1 cp config.yml laconic-registry-cli/ -# Create the required config and copy it over inside the container -config_file="config.yml" -config=$(cat < "$config_file" - -docker cp $config_file laconicd-cli-1:laconic-registry-cli/config.yml +# Wait for the laconid endpoint to come up +docker exec laconicd-laconicd-1 sh -c "curl --retry 10 --retry-delay 3 --retry-connrefused http://127.0.0.1:9473/api" # Run the tests docker exec -it -e TEST_ACCOUNT=$laconicd_account_address laconicd-cli-1 sh -c 'cd laconic-registry-cli && yarn test'