mirror of https://github.com/prometheus/prometheus
api: fix typo in list rules API response (#15400)
* Fix typo in list rules API response --------- Signed-off-by: Raphael Silva <rapphil@gmail.com>pull/15300/head
parent
63d87a60a8
commit
e664c16b31
|
@ -1374,7 +1374,7 @@ func (api *API) metricMetadata(r *http.Request) apiFuncResult {
|
|||
// RuleDiscovery has info for all rules.
|
||||
type RuleDiscovery struct {
|
||||
RuleGroups []*RuleGroup `json:"groups"`
|
||||
GroupNextToken string `json:"groupNextToken:omitempty"`
|
||||
GroupNextToken string `json:"groupNextToken,omitempty"`
|
||||
}
|
||||
|
||||
// RuleGroup has info for rules which are part of a group.
|
||||
|
|
|
@ -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…
Reference in New Issue