Skip to content

Commit

Permalink
tests/envdir-url: Add AWS_DEFAULT_REGION envvar
Browse files Browse the repository at this point in the history
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.

¹ <actions/runner-images#2791 (comment)>
  • Loading branch information
joverlee521 committed Jun 6, 2024
1 parent ef3577f commit 9b233f9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/envdir-url.t
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9b233f9

Please sign in to comment.