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>
pull/13997/head
Bryan Boreham 2 years ago
parent 5a339ba359
commit c8aed6b0ec
  1. 4
      web/api/v1/api_test.go

@ -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…
Cancel
Save