Sindweller commented on a change in pull request #627:
URL:
https://github.com/apache/apisix-ingress-controller/pull/627#discussion_r688241178
##########
File path: pkg/metrics/prometheus_test.go
##########
@@ -30,11 +30,12 @@ func apisixBadStatusCodesTestHandler(t *testing.T, metrics
[]*io_prometheus_clie
assert.Equal(t, metric.Type.String(), "GAUGE")
m := metric.GetMetric()
assert.Len(t, m, 2)
+
assert.Equal(t, *m[0].Gauge.Value, float64(1))
assert.Equal(t, *m[0].Label[0].Name, "controller_namespace")
assert.Equal(t, *m[0].Label[0].Value, "default")
assert.Equal(t, *m[0].Label[1].Name, "controller_pod")
- assert.Equal(t, *m[0].Label[1].Value, "test")
Review comment:
since we put `podName` and `podNamespace` inside
`NewPrometheusCollector()`, transfer param `"test"` to collector is disabled.
so the test result of `controller_pod` should be `""`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]