mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 13:44:05 -08:00
Single literal regexp value testcase for querier
It's common to see queries like bar=~"foo" from machine generated queries in the fronted. These are not evaluated as regexps, but are a single-value-set, i.e. and equality matchings instead. This is just a testcase for a single-value case. Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
This commit is contained in:
parent
2826fbeeb7
commit
6d99731303
|
@ -1513,6 +1513,13 @@ func TestFindSetMatches(t *testing.T) {
|
|||
pattern string
|
||||
exp []string
|
||||
}{
|
||||
// Single value, coming from a `bar=~"foo"` selector.
|
||||
{
|
||||
pattern: "^(?:foo)$",
|
||||
exp: []string{
|
||||
"foo",
|
||||
},
|
||||
},
|
||||
// Simple sets.
|
||||
{
|
||||
pattern: "^(?:foo|bar|baz)$",
|
||||
|
|
Loading…
Reference in a new issue