Compare commits

..
Author SHA1 Message Date
Michael Shaw 748cc65b9f run all 2023-02-02 16:10:58 -05:00
Michael Shaw cc2c94cd1c documentation did not match script 2023-02-02 13:54:24 -05:00
Michael Shaw 43545537e1 only run nameservice test 2023-02-01 16:31:50 -05:00
Michael Shaw 6fa47fa27c auction nameservice tests branch of sdk 2023-02-01 13:59:26 -05:00
Michael Shaw 8d866149bc bad env arg passing... done through docker compose environment now 2023-02-01 12:36:47 -05:00
Michael Shaw 7ee03b47d1 run all tests 2023-02-01 12:02:54 -05:00
Michael Shaw 4f5562d26f run all tests 2023-01-31 11:11:28 -05:00
Michael facd64a14b All test stuff (#88)
* first pass use tests/sdk-tests/run-tests.sh in github action

* - -> _

* diagnostic env step

* diagnostic env step

* diagnostic env step does not support cwd

* checkout not preserved between actions

* ./ missing

* start built containers

* missing unmarshalling of content bytes before encoding and generation of CID

* unchecked error complaint from linter

* golang linting is really picky

* utils/json test for comparing known, but deprecated method to new implementation

* try curl (retval 0) instead of wget (retval 8) for 404 that is returned

* missing curl for health check

* use feature branch for laconic-sdk... UNDO THIS LATER

* checkout is done from inside of container, rather than copied in from filesystem. checking out dev branch for now

* docker network inspect for diagnostic

* docker network inspect for diagnostic missing arg

* listen on 0.0.0.0 specfically

* trying localhost

* try host mode network

* host mode breaks name resolution of containers

* manual service check in laconicd container for diagnostic

* revert ListenAndServe

* sleep and docker logs... appears endpoint is not coming up maybe?

* disable fail_ci on codecov error... it is unstable

* turn codecov back to fail on error true to avoid invisible failure.

* Cleanup for whitespace and require.NoError in test

* new json util test, turning off codecov fails CI, and gitignore for test artifacts
2023-01-30 16:59:13 -05:00
4 changed files with 23 additions and 2 deletions
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -47,7 +47,7 @@ WORKDIR /app
RUN \
git clone https://github.com/cerc-io/laconic-sdk.git \
&& cd laconic-sdk \
&& git checkout jest_timeout \
&& git checkout auction_nameservice_tests \
&& yarn install
WORKDIR /app/laconic-sdk
+3
View File
@@ -2,6 +2,9 @@ services:
laconicd:
restart: unless-stopped
image: cerc-io/laconicd:local-test
environment:
- TEST_AUCTION_ENABLED=true
- TEST_REGISTRY_EXPIRY=true
command: ["sh", "/docker-entrypoint-scripts.d/create-fixturenet.sh"]
volumes:
- ../../init.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
+18
View File
@@ -0,0 +1,18 @@
#!/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 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"
docker logs sdk_tests-laconicd-1