File tree Expand file tree Collapse file tree 1 file changed +18
-10
lines changed
Expand file tree Collapse file tree 1 file changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -112,16 +112,24 @@ if [ $retVal -ne 0 ]; then
112112 kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/release-0.52/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
113113fi
114114
115- # Before the test starts, extract initial metrics values from the /metrics endpoint of the operator
116- extract_metrics_data
115+ if [[ " $DISABLE_METRICS " == " " ]]; then
116+
117+ # Before the test starts, extract initial metrics values from the /metrics endpoint of the operator
118+ extract_metrics_data
119+
120+ fi
117121
118122set -eu
119123
120- INITIAL_GET_REQUESTS=$GET_REQUESTS
121- INITIAL_PUT_REQUESTS=$PUT_REQUESTS
122- INITIAL_POST_REQUESTS=$POST_REQUESTS
123- INITIAL_ERROR_RECONCILES=$ERROR_RECONCILES
124- INITIAL_SUCCESS_RECONCILES=$SUCCESS_RECONCILES
124+ if [[ " $DISABLE_METRICS " == " " ]]; then
125+
126+ INITIAL_GET_REQUESTS=$GET_REQUESTS
127+ INITIAL_PUT_REQUESTS=$PUT_REQUESTS
128+ INITIAL_POST_REQUESTS=$POST_REQUESTS
129+ INITIAL_ERROR_RECONCILES=$ERROR_RECONCILES
130+ INITIAL_SUCCESS_RECONCILES=$SUCCESS_RECONCILES
131+
132+ fi
125133
126134
127135# Run the tests
@@ -194,7 +202,9 @@ sanity_test_metrics_data() {
194202 fi
195203}
196204
197- sanity_test_metrics_data
205+ if [[ " $DISABLE_METRICS " == " " ]]; then
206+ sanity_test_metrics_data
207+ fi
198208
199209set +e
200210
@@ -222,6 +232,4 @@ if [ -f "/tmp/e2e-operator-run.log" ]; then
222232 exit 1
223233 fi
224234 fi
225-
226-
227235fi
You can’t perform that action at this time.
0 commit comments