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.
@@ -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)$",
