Skip to content

Commit

Permalink
deleted secret in cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dargudear-google committed Dec 14, 2024
1 parent 5d136c2 commit d788f47
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions test/bats/gcp.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion test/scripts/run-e2e-gcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d788f47

Please sign in to comment.