From 4f5562d26febbc18743d11e6979736b4e96c338a Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Tue, 31 Jan 2023 11:11:28 -0500 Subject: [PATCH] run all tests --- .github/workflows/test.yml | 2 +- tests/sdk_tests/run-all-tests.sh | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 tests/sdk_tests/run-all-tests.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 82cb654c..20e83ca9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -102,7 +102,7 @@ jobs: run: docker compose up -d - name: run-tests.sh working-directory: tests/sdk_tests - run: ./run-tests.sh + run: ./run-all-tests.sh # integration_tests: diff --git a/tests/sdk_tests/run-all-tests.sh b/tests/sdk_tests/run-all-tests.sh new file mode 100755 index 00000000..deecc518 --- /dev/null +++ b/tests/sdk_tests/run-all-tests.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +if [ -n "$CERC_SCRIPT_DEBUG" ]; then + set -x +fi +# Get the key from laconicd +laconicd_key=$( docker compose exec laconicd echo y | 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 +# Run tests +docker network inspect sdk_tests_default +sleep 30s +docker logs laconicd +docker compose exec laconicd sh -c "curl http://127.0.0.1:9473/api" +docker compose exec laconicd sh -c "curl http://localhost:9473/api" + +docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test" +docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test:auctions" +docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test:nameservice-expiry"