laconicd-deprecated/tests/sdk_tests/run-tests.sh
Thomas E Lackey 08268b9e23
Some checks failed
Build / cleanup-runs (pull_request) Successful in 6s
Deploy Contract / cleanup-runs (pull_request) Successful in 5s
CodeQL / Analyze (go) (pull_request) Failing after 43s
Deploy Contract / deploy (pull_request) Failing after 49s
Build / build (pull_request) Failing after 1m5s
Pull Request Labeler / triage (pull_request) Failing after 29s
Dependency Review / dependency-review (pull_request) Failing after 1m15s
Run Gosec / Gosec (pull_request) Failing after 15s
Tests / cleanup-runs (pull_request) Failing after 6s
Semgrep / Scan (pull_request) Failing after 19s
Lint / Run golangci-lint (pull_request) Failing after 1m25s
Tests / test-unit-cover (pull_request) Failing after 53s
Tests / test-importer (pull_request) Failing after 51s
Lint / Run flake8 on python integration tests (pull_request) Failing after 1m55s
Tests / test-rpc (pull_request) Failing after 1m37s
Tests / sdk_tests (pull_request) Failing after 6m11s
Restore waiting for the server to be up before launching tests.
2024-01-22 16:22:30 -06:00

29 lines
872 B
Bash
Executable File

#!/usr/bin/env bash
# Forwards all args to yarn on the sdk-test-runner container
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
yarn_args=("--inspect-brk=8888")
yarn_args+=("${@:-test}")
# Get the key from laconicd
laconicd_key=$(
yes | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe
)
# 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
docker compose exec laconicd sh -c "curl --retry 10 --retry-delay 3 --retry-connrefused http://127.0.0.1:9473/api"
# 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[@]}"