Björn Rabenstein
5b9148e552
Merge pull request #14820 from charleskorn/promqltest-native-histogram-format
...
promqltest: use test expression format for histograms in assertion failure messages and include reset hint in the test expression
2024-09-20 16:47:08 +02:00
Jan Fajerski
fe4289b502
Merge branch 'main' into HEAD
2024-09-04 18:50:00 +02:00
Arve Knudsen
6ef1eb4e68
Merge pull request #14064 from aknuds1/arve/close-engine
...
Release PromQL engine resources on close, from tests
2024-09-04 12:07:35 +02:00
Charles Korn
90dc1b45db
promqltest: use test expression format for histograms in assertion failure messages
...
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-09-04 15:47:07 +10:00
Charles Korn
6548421f61
promqltest: improve error messages when unexpected type is returned, and fix inverted expected and actual values in error message when scalar value does not match expected
...
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-08-16 13:37:05 +10:00
Zhang Zhanpeng
debbdb8608
make matrix selection and lookback left-open and right-closed
...
Signed-off-by: Zhang Zhanpeng <zhangzhanpeng.zzp@alibaba-inc.com>
Signed-off-by: beorn7 <beorn@grafana.com>
Co-authored-by: beorn7 <beorn@grafana.com>
2024-06-20 22:05:40 +08:00
Arve Knudsen
b7320ef636
Merge remote-tracking branch 'prometheus/main' into arve/close-engine
2024-06-14 10:51:35 +02:00
Charles Korn
1f988f77ff
promql: extend test scripting language to support asserting on expected error message ( #14038 )
...
Add ability to assert that a query fails with a particular error message
This also adds documentation for the test scripting language in general,
including the new feature.
Signed-off-by: Charles Korn <charles.korn@grafana.com>
---------
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-06-06 17:56:25 +02:00
Arve Knudsen
0cc99e677a
promql.Engine: Add Close method
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2024-05-28 12:01:47 +02:00
Bryan Boreham
babfcfdd91
refactor: Move NewTestEngine into promqltest
...
And export `DefaultMaxSamplesPerQuery` so callers can replicate previous
behaviour.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-05-08 16:07:28 +01:00
Bryan Boreham
9aa321d672
test: make field initializers explicit
...
Lint started complaining after I moved the file.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-05-08 13:42:55 +01:00
Bryan Boreham
ccf73266f0
test: move promqltest tests together with the implementation
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-05-08 13:42:55 +01:00