Add tests for invalid uses of "offset".

This commit is contained in:
Julius Volz 2015-02-18 02:56:40 +01:00
parent 67e20acc6c
commit 15b2b5aa66
1 changed files with 8 additions and 0 deletions

View File

@ -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)