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