From 7250d4760615d3896a014ebfd3a8bf8a4a320bc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Duchesneau?= Date: Fri, 6 Dec 2024 16:19:24 -0500 Subject: [PATCH] fix docker tests --- tests/entrypoint.sh | 14 +------------- tests/integration_test.go | 6 +++++- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/tests/entrypoint.sh b/tests/entrypoint.sh index 2ef4c6b..2bd14ad 100755 --- a/tests/entrypoint.sh +++ b/tests/entrypoint.sh @@ -1,19 +1,7 @@ #!/usr/bin/env bash set -euxo pipefail -listen_address= -if [[ ${TEST_STAGING:-false} == "true" ]]; then - listen_address="https://codegen-staging.substreams.dev" -else - if [[ -z ${CI} ]]; then - listen_address="http://host.docker.internal:9000" - else - # Codegen address when running test - listen_address="http://172.17.0.1:9000" - fi -fi - -SUBSTREAMS_CODEGEN_ENDPOINT=$listen_address substreams init --state-file /app/generator.json --force-download-cwd +substreams init --state-file /app/generator.json --force-download-cwd substreams build diff --git a/tests/integration_test.go b/tests/integration_test.go index c216863..e1eec5c 100644 --- a/tests/integration_test.go +++ b/tests/integration_test.go @@ -111,9 +111,11 @@ func TestIntegration(t *testing.T) { validateBinary(t, "cargo") validateBinary(t, "buf") + parallel := true hasSSCache := hasBinary("sscache") if !hasSSCache { zlog.Info("sscache not found, tests will not run in parallel (run `cargo install sscache` to enable parallelism)") + parallel = false } else { os.Setenv("RUSTC_WRAPPER", "sccache") os.Setenv("SSCACHE_DIR", filepath.Join(os.TempDir(), "sscachedir")) @@ -122,7 +124,9 @@ func TestIntegration(t *testing.T) { for _, c := range cases { c := c t.Run(c.name, func(t *testing.T) { - t.Parallel() + if parallel { + t.Parallel() + } runTestLocally(t, c.stateFile) }) }