-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Closed
Description
Proposal
The promql testing framework currently treats annotations as follows:
evalandeval_orderedrequire no annotation.eval_warnrequires one or more warn annotations, but no info annotation.eval_inforequires one or more info annotations, but no warn annotation.
This has the following shortcomings:
- It is impossible to use
eval_orderedfor an expression that returns one or more annotations. - It is impossible to test for a combination of warn and info annotations.
- It is impossible to test for specific annotations (in contrast to what is possible for errors via
expected_fail_message). - It is impossible to write a test that doesn't care about annotations at all.
Clearly, we cannot just increase the multiplicity of eval_... keywords to cover all permutations (eval_warn_info, eval_ordered_warn etc.). Furthermore, we cannot easily extend the syntactical approach of expected_fail_message because the latter replaces the result section (but annotations are coming in addition to a result).
Reactions are currently unavailable