From 9b233f9755d131973d76b708e444162357cd34de Mon Sep 17 00:00:00 2001 From: Jover Lee Date: Thu, 6 Jun 2024 14:56:15 -0700 Subject: [PATCH] tests/envdir-url: Add `AWS_DEFAULT_REGION` envvar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AWS CLI v2 runs into errors if the region is not defined¹ The AWS_DEFAULT_REGION variable is available in the GH Action CI after the aws-actions/configure-aws-credentials@v4 step. ¹ --- tests/envdir-url.t | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/envdir-url.t b/tests/envdir-url.t index 9d1ea02b..991e060a 100755 --- a/tests/envdir-url.t +++ b/tests/envdir-url.t @@ -24,26 +24,26 @@ Files are populated from NEXTSTRAIN_ENVD_URL. $ aws s3 cp --quiet env.d.zip "$NEXTSTRAIN_ENVD_URL" - $ docker run --rm -e NEXTSTRAIN_ENVD_URL --env=AWS_{ACCESS_KEY_ID,SECRET_ACCESS_KEY,SESSION_TOKEN} "$IMAGE" \ + $ docker run --rm -e NEXTSTRAIN_ENVD_URL --env=AWS_{ACCESS_KEY_ID,SECRET_ACCESS_KEY,SESSION_TOKEN,DEFAULT_REGION} "$IMAGE" \ > bash -eu -c 'echo "$a"; echo "$b"' download: s3://nextstrain-tmp/*.zip to ../env.d.zip (glob) Archive: /nextstrain/env.d.zip - extracting: /nextstrain/env.d/a - inflating: /nextstrain/env.d/b - extracting: /nextstrain/env.d/z + extracting: /nextstrain/env.d/a + inflating: /nextstrain/env.d/b + extracting: /nextstrain/env.d/z removed '/nextstrain/env.d.zip' AAAA BB BB BB Files and NEXTSTRAIN_ENVD_URL are removed with NEXTSTRAIN_DELETE_ENVD=1. - $ docker run --rm -e NEXTSTRAIN_DELETE_ENVD=1 -e NEXTSTRAIN_ENVD_URL --env=AWS_{ACCESS_KEY_ID,SECRET_ACCESS_KEY,SESSION_TOKEN} "$IMAGE" \ + $ docker run --rm -e NEXTSTRAIN_DELETE_ENVD=1 -e NEXTSTRAIN_ENVD_URL --env=AWS_{ACCESS_KEY_ID,SECRET_ACCESS_KEY,SESSION_TOKEN,DEFAULT_REGION} "$IMAGE" \ > bash -eu -c 'echo "$a"; echo "$b"; ls -1 /nextstrain/env.d' download: s3://nextstrain-tmp/*.zip to ../env.d.zip (glob) Archive: /nextstrain/env.d.zip - extracting: /nextstrain/env.d/a - inflating: /nextstrain/env.d/b - extracting: /nextstrain/env.d/z + extracting: /nextstrain/env.d/a + inflating: /nextstrain/env.d/b + extracting: /nextstrain/env.d/z removed '/nextstrain/env.d.zip' delete: s3://nextstrain-tmp/*.zip (glob) AAAA