From d799078c883b869b739efcee965503f99ebadc05 Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Sat, 8 Feb 2020 16:42:33 +0100 Subject: [PATCH] also test start and end Signed-off-by: Julien Pivotto --- cmd/prometheus/query_log_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/prometheus/query_log_test.go b/cmd/prometheus/query_log_test.go index 503982bf28e..b0d551b8fc7 100644 --- a/cmd/prometheus/query_log_test.go +++ b/cmd/prometheus/query_log_test.go @@ -152,6 +152,8 @@ func (p *queryLogTest) validateLastQuery(t *testing.T, ql []queryLogLine) { switch p.origin { case apiOrigin: testutil.Equals(t, 5, q.Params.Step) + testutil.Equals(t, "1970-01-01T00:00:00.000Z", q.Params.Start) + testutil.Equals(t, "1970-01-01T01:00:00.000Z", q.Params.End) default: testutil.Equals(t, 0, q.Params.Step) } @@ -362,6 +364,8 @@ type queryLogLine struct { Params struct { Query string `json:"query"` Step int `json:"step"` + Start string `json:"start"` + End string `json:"end"` } `json:"params"` Request struct { Path string `json:"path"`