promtool: support missing promql syntax features (#17926)
Namely promql-duration-expr and promql-extended-range-selectors. This allows promtool to e.g. check rules files using syntax gated by these features. Signed-off-by: Ian Kerins <git@isk.haus>pull/18047/head
parent
1dcdb07d30
commit
4383499997
@ -1,6 +1,10 @@ |
||||
groups: |
||||
- name: features |
||||
rules: |
||||
- record: x |
||||
# We don't expect anything from this, just want to check the function parses. |
||||
# We don't expect anything from these, just want to check the syntax parses. |
||||
- record: promql-experimental-functions |
||||
expr: sort_by_label(up, "instance") |
||||
- record: promql-duration-expr |
||||
expr: rate(up[1m * 2]) |
||||
- record: promql-extended-range-selectors |
||||
expr: rate(up[1m] anchored) |
||||
|
||||
Loading…
Reference in new issue