diff --git a/test/bats/gcp.bats b/test/bats/gcp.bats index e24bc60f3..d7ba1685c 100644 --- a/test/bats/gcp.bats +++ b/test/bats/gcp.bats @@ -48,6 +48,17 @@ export FILE_NAME=${FILE_NAME:-"secret"} } +@test "CSI inline volume test with rotation - read gcp kv secret from pod" { + echo -n "secret-b" | gcloud secrets versions add ${SECRET_ID} --data-file=- + + # wait for secret rotation + sleep 120 + archive_info + result=$(kubectl exec secrets-store-inline-crd --namespace=$NAMESPACE -- cat /mnt/secrets-store/$FILE_NAME) + [[ "${result//$'\r'}" == "secret-b" ]] + +} + @test "CSI inline volume test with pod portability - unmount succeeds" { # On Linux a failure to unmount the tmpfs will block the pod from being # deleted. diff --git a/test/scripts/run-e2e-gcp.sh b/test/scripts/run-e2e-gcp.sh index 9694f2c80..4da23a4da 100755 --- a/test/scripts/run-e2e-gcp.sh +++ b/test/scripts/run-e2e-gcp.sh @@ -25,7 +25,7 @@ function boskosctlwrapper() { } cleanup() { - gcloud beta secrets delete ${SECRET_ID} --data-file=- --ttl=1800s --quiet + gcloud beta secrets delete ${SECRET_ID} --quiet # stop boskos heartbeat if [ -n "${BOSKOS_HOST:-}" ]; then boskosctlwrapper release --name "${ }" --target-state dirty