Charles Korn
f6e4b775e2
Check for errors first
...
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-08-07 14:25:46 +10:00
Filip Petkovski
cb8b6d7504
Allow built-in tests to be customized
...
The RunBuiltinTests function accepts a concrete type which makes
it hard to exclude certain tests from the suite. It would be great
if we could skip tests which might not be critical in order to unblock
updates.
By accepting an interface instead, we can inject a custom implementation
which would skips select test cases.
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2024-07-11 14:19:09 +02:00
Jeanette Tan
fc9dc72028
remove eval_with_nhcb
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-06-20 22:49:00 +08:00
Jeanette Tan
b8cb12b989
rename hist to histogram according to code review
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-06-07 20:26:41 +08:00
Jeanette Tan
14f8dded39
Merge branch 'main' into nhcb
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-06-07 19:17:14 +08:00
Jeanette Tan
b0e320425c
refine test rewriting regex and add validation
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-06-07 18:50:59 +08:00
Jeanette Tan
9adc1699c3
fix according to code review
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-06-07 18:50:59 +08: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
Jeanette Tan
f028496133
Merge branch 'main' into nhcb
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-05-14 16:20:15 +08:00
Bryan Boreham
786e0e706c
test: PromQL: stop using internal fields of engine
...
* set enablePerStepStats and lookback duration via
`NewTestEngine` parameters.
* check maxSamples by recreating query engine
* check lookback without modifying internals
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-05-08 19:58:41 +01: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
b3c15d2246
test: clean up promqltest package references
...
So it nearly compiles.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-05-08 13:42:55 +01:00
Bryan Boreham
11b27d5d22
test: move test files into new promqltest package
...
So that promql package does not bring in test-only dependencies.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-05-08 13:42:55 +01:00