Skip to content

Commit

Permalink
uodate user IAM tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anurag4DSB committed Jan 1, 2025
1 parent a2a6b0b commit 0711066
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/scripts/e2e_tests_metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ if [[ "$EXPECTED_CREATE_BUCKET" -gt 0 ]]; then
# Capture the counts for S3 and IAM requests
CREATE_BUCKET_COUNT="$(echo "$S3_IAM_METRICS_OUTPUT" | grep 'scality_cosi_driver_s3_requests_total' | grep 'method="CreateBucket"' | grep 'status="success"' | awk '{print $NF}' | awk '{sum+=$1} END {print sum}')"
DELETE_BUCKET_COUNT="$(echo "$S3_IAM_METRICS_OUTPUT" | grep 'scality_cosi_driver_s3_requests_total' | grep 'method="DeleteBucket"' | grep 'status="success"' | awk '{print $NF}' | awk '{sum+=$1} END {print sum}')"
CREATE_USER_COUNT="$(echo "$S3_IAM_METRICS_OUTPUT" | grep 'scality_cosi_driver_iam_requests_total' | grep 'method="CreateUser"' | grep 'status="success"' | awk '{print $NF}' | awk '{sum+=$1} END {print sum}')"
DELETE_USER_COUNT="$(echo "$S3_IAM_METRICS_OUTPUT" | grep 'scality_cosi_driver_iam_requests_total' | grep 'method="DeleteUser"' | grep 'status="success"' | awk '{print $NF}' | awk '{sum+=$1} END {print sum}')"
# Capture the durations for S3 and IAM requests
CREATE_BUCKET_DURATION="$(echo "$S3_IAM_METRICS_OUTPUT" | grep 'scality_cosi_driver_s3_request_duration_seconds_sum' | grep 'method="CreateBucket"' | awk '{print $NF}' | awk '{sum+=$1} END {print sum}')"
DELETE_BUCKET_DURATION="$(echo "$S3_IAM_METRICS_OUTPUT" | grep 'scality_cosi_driver_s3_request_duration_seconds_sum' | grep 'method="DeleteBucket"' | awk '{print $NF}' | awk '{sum+=$1} END {print sum}')"
CREATE_USER_DURATION="$(echo "$S3_IAM_METRICS_OUTPUT" | grep 'scality_cosi_driver_iam_request_duration_seconds_sum' | grep 'method="CreateUser"' | awk '{print $NF}' | awk '{sum+=$1} END {print sum}')"
DELETE_USER_DURATION="$(echo "$S3_IAM_METRICS_OUTPUT" | grep 'scality_cosi_driver_iam_request_duration_seconds_sum' | grep 'method="DeleteUser"' | awk '{print $NF}' | awk '{sum+=$1} END {print sum}')"
CREATE_USER_COUNT="$(echo "$S3_IAM_METRICS_OUTPUT" | grep 'scality_cosi_driver_s3_requests_total' | grep 'method="CreateUser"' | grep 'status="success"' | awk -F ' ' '{print $NF}' | awk '{s+=$1} END {print s}')"
DELETE_USER_COUNT="$(echo "$S3_IAM_METRICS_OUTPUT" | grep 'scality_cosi_driver_s3_requests_total' | grep 'method="DeleteUser"' | grep 'status="success"' | awk -F ' ' '{print $NF}' | awk '{s+=$1} END {print s}')"
CREATE_USER_DURATION="$(echo "$S3_IAM_METRICS_OUTPUT" | grep 'scality_cosi_driver_s3_request_duration_seconds_sum' | grep 'method="CreateUser"' | awk '{s+=$NF} END {print s}')"
DELETE_USER_DURATION="$(echo "$S3_IAM_METRICS_OUTPUT" | grep 'scality_cosi_driver_s3_request_duration_seconds_sum' | grep 'method="DeleteUser"' | awk '{s+=$NF} END {print s}')"


# Debug output
echo "CreateBucket Count: $CREATE_BUCKET_COUNT, Expected: $EXPECTED_CREATE_BUCKET" | tee -a "$LOG_FILE"
Expand Down

0 comments on commit 0711066

Please sign in to comment.