mirror of
https://github.com/prometheus/prometheus
synced 2025-01-14 02:43:35 +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,8 +2892,10 @@ func testEndpoints(t *testing.T, api *API, tr *testTargetRetriever, es storage.E
|
||||
if test.zeroFunc != nil {
|
||||
test.zeroFunc(res.data)
|
||||
}
|
||||
if test.response != nil {
|
||||
assertAPIResponse(t, res.data, test.response)
|
||||
}
|
||||
}
|
||||
|
||||
if test.responseAsJSON != "" {
|
||||
json := jsoniter.ConfigCompatibleWithStandardLibrary
|
||||
|
Loading…
Reference in New Issue
Block a user