Browse Source

Add test to validate empty response

Signed-off-by: Raphael Silva <rapphil@gmail.com>
pull/15400/head
Raphael Silva 1 week ago
parent
commit
0760610902
  1. 8
      web/api/v1/api_test.go

8
web/api/v1/api_test.go

@ -2899,6 +2899,14 @@ func testEndpoints(t *testing.T, api *API, tr *testTargetRetriever, es storage.E
errType: errorBadData,
zeroFunc: rulesZeroFunc,
},
{ // groupNextToken should not be in empty response
endpoint: api.rules,
query: url.Values{
"match[]": []string{`{testlabel="abc-cannot-find"}`},
"group_limit": []string{"1"},
},
responseAsJSON: `{"groups":[]}`,
},
{
endpoint: api.queryExemplars,
query: url.Values{

Loading…
Cancel
Save