mirror of
https://github.com/prometheus/prometheus
synced 2024-12-26 16:43:21 +00:00
tests: API: Let nil expected response mean skip check
When we want to check just the json encoding. Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
parent
5a339ba359
commit
c8aed6b0ec
@ -2892,7 +2892,9 @@ func testEndpoints(t *testing.T, api *API, tr *testTargetRetriever, es storage.E
|
||||
if test.zeroFunc != nil {
|
||||
test.zeroFunc(res.data)
|
||||
}
|
||||
assertAPIResponse(t, res.data, test.response)
|
||||
if test.response != nil {
|
||||
assertAPIResponse(t, res.data, test.response)
|
||||
}
|
||||
}
|
||||
|
||||
if test.responseAsJSON != "" {
|
||||
|
Loading…
Reference in New Issue
Block a user