diff --git a/promql/engine_test.go b/promql/engine_test.go index 9ba93abc78..fcadfa1062 100644 --- a/promql/engine_test.go +++ b/promql/engine_test.go @@ -1900,6 +1900,15 @@ func TestSubquerySelector(t *testing.T) { }, Start: time.Unix(35, 0), }, + { + Query: "metric[0:10s]", + Result: promql.Result{ + nil, + promql.Matrix{}, + nil, + }, + Start: time.Unix(10, 0), + }, }, }, { @@ -3251,6 +3260,11 @@ func TestInstantQueryWithRangeVectorSelector(t *testing.T) { }, }, }, + "matches series but range is 0": { + expr: "some_metric[0]", + ts: baseT.Add(2 * time.Minute), + expected: promql.Matrix{}, + }, } for name, testCase := range testCases {