Add tests for invalid uses of "offset".
This commit is contained in:
parent
67e20acc6c
commit
15b2b5aa66
|
@ -633,6 +633,14 @@ func TestExpressions(t *testing.T) {
|
|||
`{group="production", instance="1", job="api-server"} => 0.06666666666666667 @[%v]`,
|
||||
},
|
||||
},
|
||||
{
|
||||
expr: `rate(http_requests[10m]) offset 5m`,
|
||||
shouldFail: true,
|
||||
},
|
||||
{
|
||||
expr: `sum(http_requests) offset 5m`,
|
||||
shouldFail: true,
|
||||
},
|
||||
}
|
||||
|
||||
storage, closer := newTestStorage(t)
|
||||
|
|
Loading…
Reference in New Issue