From 9d878245197216ea828aeaa56d957912cfd5ccaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ste=CC=81phane=20Duchesneau?= Date: Fri, 17 Jan 2025 10:29:42 -0500 Subject: [PATCH 1/3] test validate the buftoken is there --- tests/entrypoint.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/entrypoint.sh b/tests/entrypoint.sh index 2bd14ad..9391c2b 100755 --- a/tests/entrypoint.sh +++ b/tests/entrypoint.sh @@ -1,9 +1,11 @@ #!/usr/bin/env bash -set -euxo pipefail +#set -euxo pipefail -substreams init --state-file /app/generator.json --force-download-cwd - -substreams build - -## To validate the manifest -substreams info +echo buf token len is ${#BUF_TOKEN} +#substreams init --state-file /app/generator.json --force-download-cwd +# +#substreams build +# +### To validate the manifest +#substreams info +# From 8e2f3101ae8808388c66387793cde6506590d2e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ste=CC=81phane=20Duchesneau?= Date: Fri, 17 Jan 2025 10:33:58 -0500 Subject: [PATCH 2/3] test validate the buftoken is there part 2 --- tests/entrypoint.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/entrypoint.sh b/tests/entrypoint.sh index 9391c2b..b3cfe33 100755 --- a/tests/entrypoint.sh +++ b/tests/entrypoint.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bash #set -euxo pipefail -echo buf token len is ${#BUF_TOKEN} +if [[ ${#BUF_TOKEN} == 0 ]]; then + echo "BUF_TOKEN is not set" + exit 1 +fi #substreams init --state-file /app/generator.json --force-download-cwd # #substreams build From fb3e1e5fce463e9e1822f1e0300ff90ed22d9a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ste=CC=81phane=20Duchesneau?= Date: Fri, 17 Jan 2025 10:37:11 -0500 Subject: [PATCH 3/3] pass buf-token in -e flag to docker tests --- tests/integration_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration_test.go b/tests/integration_test.go index e3ab027..1455841 100644 --- a/tests/integration_test.go +++ b/tests/integration_test.go @@ -215,6 +215,8 @@ func runTestsInDocker(t *testing.T, cases []struct { fmt.Sprintf("%s:/app/generator.json", c.stateFile), "-e", "SUBSTREAMS_CODEGEN_ENDPOINT=" + endpoint, + "-e", + "BUF_TOKEN=" + os.Getenv("BUF_TOKEN"), "substreams-test-image", }