Skip to content

Commit

Permalink
debug commit
Browse files Browse the repository at this point in the history
  • Loading branch information
anurag4DSB committed Dec 13, 2024
1 parent fa9d831 commit c0fe89f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/scripts/e2e_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,17 @@ log_and_run echo "Verifying bucket deletion with name '$BUCKET_TO_BE_DELETED'...

# Check if the bucket has been deleted
log_and_run aws s3 ls --endpoint-url "$S3_ENDPOINT"

# Run head-bucket to check if the bucket has been deleted
BUCKET_HEAD_RESULT=$(log_and_run AWS_MAX_ATTEMPTS=$ATTEMPTS AWS_RETRY_DELAY=$DELAY aws --endpoint-url "$S3_ENDPOINT" s3api head-bucket --bucket "$BUCKET_TO_BE_DELETED" --profile iam 2>&1 || true)

# Log the actual error result for debugging purposes
log_and_run echo "head-bucket result: $BUCKET_HEAD_RESULT"

# Check if the result contains the "Not Found" error message
if [[ "$BUCKET_HEAD_RESULT" == *"Not Found"* ]]; then
log_and_run echo "Bucket with name '$BUCKET_TO_BE_DELETED' was successfully deleted (Not Found error)."
else
log_and_run echo "Bucket with name '$BUCKET_TO_BE_DELETED' was not deleted after $ATTEMPTS attempts."
log_and_run echo "Bucket with name '$BUCKET_TO_BE_DELETED' was not deleted after $ATTEMPTS attempts. Error: $BUCKET_HEAD_RESULT"
exit 1
fi

0 comments on commit c0fe89f

Please sign in to comment.