Skip to content

Commit

Permalink
Merge pull request #24994 from smarterclayton/metrics_weaken
Browse files Browse the repository at this point in the history
Bug 1835845: Metrics test for router should allow backend metrics
  • Loading branch information
openshift-merge-robot committed May 20, 2020
2 parents 072d576 + 467d52f commit fcd8db6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/extended/router/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ var _ = g.Describe("[sig-network][Feature:Router]", func() {
// route specific metrics from server and backend
o.Expect(findGaugesWithLabels(metrics["haproxy_server_http_responses_total"], serverLabels.With("code", "2xx"))).To(o.ConsistOf(o.BeNumerically(">", 0), o.BeNumerically(">", 0)))
o.Expect(findGaugesWithLabels(metrics["haproxy_server_http_responses_total"], serverLabels.With("code", "5xx"))).To(o.Equal([]float64{0, 0}))
// only server returns response counts
o.Expect(findGaugesWithLabels(metrics["haproxy_backend_http_responses_total"], routeLabels.With("code", "2xx"))).To(o.HaveLen(0))
// backends will start returning response counts in https://github.com/openshift/router/pull/132
if arr := findGaugesWithLabels(metrics["haproxy_backend_http_responses_total"], routeLabels.With("code", "2xx")); len(arr) == 0 {
e2e.Logf("waiting for https://github.com/openshift/router/pull/132 to merge before this will be removed")
}
o.Expect(findGaugesWithLabels(metrics["haproxy_server_connections_total"], serverLabels)).To(o.ConsistOf(o.BeNumerically(">=", 0), o.BeNumerically(">=", 0)))
o.Expect(findGaugesWithLabels(metrics["haproxy_backend_connections_total"], routeLabels)).To(o.ConsistOf(o.BeNumerically(">=", times)))
o.Expect(findGaugesWithLabels(metrics["haproxy_server_up"], serverLabels)).To(o.Equal([]float64{1, 1}))
Expand Down

0 comments on commit fcd8db6

Please sign in to comment.