Merge pull request #1706 from sthaha/test-newline-in-metricset

Assert that newlines in coma separated arguments are ignored
This commit is contained in:
Kubernetes Prow Robot 2022-03-09 06:14:12 -08:00 committed by GitHub
commit 57533e4d60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -175,6 +175,14 @@ func TestMetricSetSet(t *testing.T) {
"kube_daemonset_labels": {},
}),
},
{
Desc: "newlines are ignored",
Value: "\n^kube_.+_annotations$,\n ^kube_secret_labels$\n",
Wanted: MetricSet{
"^kube_secret_labels$": struct{}{},
"^kube_.+_annotations$": struct{}{},
},
},
}
for _, test := range tests {