Skip to content

Commit 10d8b87

Browse files
authored
Merge branch 'master' into cv/robust-imds
2 parents 6784eff + 2f5bebf commit 10d8b87

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

.github/workflows/CI.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,13 @@ jobs:
4141
steps:
4242
- uses: actions/checkout@v4
4343
- name: Debug OIDC Claims
44-
if: ${{ env.RUN_INTEGRATION_TESTS == 'true' && runner.os == 'Linux' }}
45-
uses: github/actions-oidc-debugger@v1
46-
with:
44+
if: ${{ env.RUN_INTEGRATION_TESTS == 'true' }}
45+
# TODO: Switch to `steve-todorov/oidc-debugger-action@v1` once it's working
46+
run: |
47+
TOKEN_JSON="$(curl -fsSL -H "Authorization: bearer ${ACTIONS_ID_TOKEN_REQUEST_TOKEN:?}" "${ACTIONS_ID_TOKEN_REQUEST_URL:?}&audience=${audience:?}")"
48+
ID_TOKEN="$(echo "${TOKEN_JSON:?}" | jq -r .value)"
49+
echo "${ID_TOKEN:?}" | awk -F. '{print $2}' | base64 -d 2>/dev/null | jq -r
50+
env:
4751
audience: sts.amazonaws.com
4852
- name: Assume AWS role
4953
if: ${{ env.RUN_INTEGRATION_TESTS == 'true' }}

test/integration/AWS.jl

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,14 @@ end
462462
@testset "Glacier" begin
463463
@test AWSServices.glacier isa RestJSONService
464464

465+
function wait_for_vault_deletion(vault_name)
466+
timedwait(60; pollint=5) do
467+
result = Glacier.list_vaults("-")
468+
available_vault_names = [v["VaultName"] for v in result["VaultList"]]
469+
return !(vault_name in available_vault_names)
470+
end
471+
end
472+
465473
@testset "high-level" begin
466474
timestamp = _now_formatted()
467475
vault_names = ["aws-jl-test-01---$timestamp", "aws-jl-test-02---$timestamp"]
@@ -500,11 +508,8 @@ end
500508
end
501509
end
502510

503-
result = Glacier.list_vaults("-")
504-
res_vault_names = [v["VaultName"] for v in result["VaultList"]]
505-
506-
for vault in vault_names
507-
@test !(vault in res_vault_names)
511+
for vault_name in vault_names
512+
@test wait_for_vault_deletion(vault_name) === :ok
508513
end
509514
end
510515

@@ -548,11 +553,8 @@ end
548553
end
549554
end
550555

551-
result = AWSServices.glacier("GET", "/-/vaults")
552-
res_vault_names = [v["VaultName"] for v in result["VaultList"]]
553-
554-
for vault in vault_names
555-
@test !(vault in res_vault_names)
556+
for vault_name in vault_names
557+
@test wait_for_vault_deletion(vault_name) === :ok
556558
end
557559
end
558560
end

0 commit comments

Comments
 (0)