Skip to content

Commit

Permalink
made metrics e2e configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
anurag4DSB committed Dec 23, 2024
1 parent 0e30c30 commit 2988577
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 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 @@ -10,11 +10,11 @@ LOCAL_PORT=8080
TARGET_PORT=8080

# Declare expected values for each metric as environment variables
EXPECTED_CREATE_BUCKET=2
EXPECTED_DELETE_BUCKET=1
EXPECTED_GET_INFO=1
EXPECTED_GRANT_ACCESS=2
EXPECTED_REVOKE_ACCESS=2
EXPECTED_CREATE_BUCKET=${1:-0}
EXPECTED_DELETE_BUCKET=${2:-0}
EXPECTED_GET_INFO=${3:-1}
EXPECTED_GRANT_ACCESS=${4:-0}
EXPECTED_REVOKE_ACCESS=${5:-0}
GRPC_METHOD_TO_TEST="grpc_server_msg_sent_total"

# Error handling function
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/e2e-feature-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ jobs:
restore-keys: |
docker-${{ runner.os }}-
- name: Parallelize COSI Setup and Loading Cached Images
run: |
# Start COSI setup and ensure it stops the workflow on failure
Expand Down Expand Up @@ -110,9 +109,13 @@ jobs:
run: |
.github/scripts/e2e_tests_brownfield_use_case.sh
# the script accepts number of requests for APIs for CREATE_BUCKET, DELETE_BUCKET, GET_INFO
# GRANT_ACCESS and REVOKE_ACCESS in order
# Example below we we are testing for 2 CREATE_BUCKET, 1 DELETE_BUCKET,
# 1 GET_INFO, 2 GRANT_ACCESS and 2 REVOKE_ACCESS API counts
- name: E2E tests for metrics using calls made in above tests
run: |
.github/scripts/e2e_tests_metrics.sh
.github/scripts/e2e_tests_metrics.sh 2 1 1 2 2
- name: "Delay completion"
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/helm-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,13 @@ jobs:
run: |
.github/scripts/verify_helm_install.sh
# the script accepts number of requests for APIs for CREATE_BUCKET, DELETE_BUCKET, GET_INFO
# GRANT_ACCESS and REVOKE_ACCESS in order
# Example below we we are testing for 0 CREATE_BUCKET, 0 DELETE_BUCKET,
# 1 GET_INFO, 0 GRANT_ACCESS and 0 REVOKE_ACCESS API counts
- name: E2E tests for metrics using calls made in above tests
run: |
.github/scripts/e2e_tests_metrics.sh
.github/scripts/e2e_tests_metrics.sh 0 0 1 0 0
- name: "Delay completion"
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
Expand Down

0 comments on commit 2988577

Please sign in to comment.