mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-06 01:38:10 +00:00
pkg/naming: fix unit test
This commit is contained in:
parent
99d52a4ce8
commit
2374cef641
1 changed files with 3 additions and 4 deletions
|
|
@ -341,17 +341,16 @@ func TestBuildExternalSelector(t *testing.T) {
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "multiple LabelValuesByName",
|
name: "single LabelValuesByName with multiple selectors",
|
||||||
|
|
||||||
mq: mustNewQuery(`<<.LabelValuesByName>>`, false),
|
mq: mustNewQuery(`<<.LabelValuesByName>>`, false),
|
||||||
metricSelector: labels.NewSelector().Add(
|
metricSelector: labels.NewSelector().Add(
|
||||||
*mustNewLabelRequirement("foo", selection.Equals, []string{"bar"}),
|
*mustNewLabelRequirement("foo", selection.In, []string{"bar", "baz"}),
|
||||||
*mustNewLabelRequirement("qux", selection.In, []string{"bar", "baz"}),
|
|
||||||
),
|
),
|
||||||
|
|
||||||
check: checks(
|
check: checks(
|
||||||
hasError(nil),
|
hasError(nil),
|
||||||
hasSelector("map[foo:bar qux:bar|baz]"),
|
hasSelector("map[foo:bar|baz]"),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue