2022-12-21 20:51:01 +00:00
|
|
|
#!/usr/bin/env bash
|
2023-10-06 12:05:48 +00:00
|
|
|
# Forwards all args to yarn on the sdk-test-runner container
|
|
|
|
|
2022-12-21 20:51:01 +00:00
|
|
|
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
2023-09-05 11:37:45 +00:00
|
|
|
|
|
|
|
yarn_args=("--inspect-brk=8888")
|
|
|
|
yarn_args+=("${@:-test}")
|
|
|
|
|
2022-12-21 20:51:01 +00:00
|
|
|
# Get the key from laconicd
|
2023-09-05 11:37:45 +00:00
|
|
|
laconicd_key=$(
|
|
|
|
yes | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe
|
|
|
|
)
|
2022-12-21 20:51:01 +00:00
|
|
|
# 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
|
2023-01-30 21:59:13 +00:00
|
|
|
|
2023-09-05 11:37:45 +00:00
|
|
|
# Run tests
|
|
|
|
docker compose exec \
|
|
|
|
-e COSMOS_CHAIN_ID="$cosmos_chain_id" \
|
|
|
|
-e LACONICD_REST_ENDPOINT="$laconicd_rest_endpoint" \
|
|
|
|
-e LACONICD_GQL_ENDPOINT="$laconicd_gql_endpoint" \
|
|
|
|
-e PRIVATE_KEY="$laconicd_key" \
|
|
|
|
sdk-test-runner yarn run "${yarn_args[@]}"
|