Skip to content

Commit

Permalink
updated error message
Browse files Browse the repository at this point in the history
  • Loading branch information
anurag4DSB committed Dec 9, 2024
1 parent 812d352 commit 4ae60be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/scripts/e2e_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,12 @@ log_and_run kubectl delete -f cosi-examples/bucketaccess.yaml

# Step 12: Verify IAM User Deletion
log_and_run echo "Verifying IAM user '$IAM_USER_NAME' deletion..."
log_and_run aws --endpoint-url "$IAM_ENDPOINT" iam get-user --user-name "$IAM_USER_NAME"

# Retry logic for checking user deletion

for ((i=1; i<=$ATTEMPTS; i++)); do
USER_EXISTS=$(aws --endpoint-url "$IAM_ENDPOINT" iam get-user --user-name "$IAM_USER_NAME" 2>&1 || true)
USER_EXISTS="$(aws --endpoint-url "$IAM_ENDPOINT" iam get-user --user-name "$IAM_USER_NAME" 2>&1 || true)"

if [[ "$USER_EXISTS" == *"NoSuchEntity"* ]]; then
log_and_run echo "IAM user '$IAM_USER_NAME' successfully deleted."
Expand Down

0 comments on commit 4ae60be

Please sign in to comment.