mirror of https://github.com/status-im/consul.git
Adjust metrics test (#18837)
This commit is contained in:
parent
a89938e0c1
commit
461549e304
|
@ -35,9 +35,8 @@ func recordPromMetrics(t *testing.T, a *TestAgent, respRec *httptest.ResponseRec
|
|||
req, err := http.NewRequest("GET", "/v1/agent/metrics?format=prometheus", nil)
|
||||
require.NoError(t, err, "Failed to generate new http request.")
|
||||
|
||||
_, err = a.srv.AgentMetrics(respRec, req)
|
||||
require.NoError(t, err, "Failed to serve agent metrics")
|
||||
|
||||
a.srv.h.ServeHTTP(respRec, req)
|
||||
require.Equalf(t, 200, respRec.Code, "expected 200, got %d, body: %s", respRec.Code, respRec.Body.String())
|
||||
}
|
||||
|
||||
func assertMetricExists(t *testing.T, respRec *httptest.ResponseRecorder, metric string) {
|
||||
|
|
Loading…
Reference in New Issue