Add test to validate empty response

Signed-off-by: Raphael Silva <rapphil@gmail.com>
pull/15400/head
Raphael Silva 2 weeks ago
parent fed1c98ea5
commit 0760610902

@ -2899,6 +2899,14 @@ func testEndpoints(t *testing.T, api *API, tr *testTargetRetriever, es storage.E
errType: errorBadData, errType: errorBadData,
zeroFunc: rulesZeroFunc, 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, endpoint: api.queryExemplars,
query: url.Values{ query: url.Values{

Loading…
Cancel
Save