Skip to content

Commit 57533e4

Browse files
authored
Merge pull request #1706 from sthaha/test-newline-in-metricset
Assert that newlines in coma separated arguments are ignored
2 parents ef8bede + c309956 commit 57533e4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/options/types_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,14 @@ func TestMetricSetSet(t *testing.T) {
175175
"kube_daemonset_labels": {},
176176
}),
177177
},
178+
{
179+
Desc: "newlines are ignored",
180+
Value: "\n^kube_.+_annotations$,\n ^kube_secret_labels$\n",
181+
Wanted: MetricSet{
182+
"^kube_secret_labels$": struct{}{},
183+
"^kube_.+_annotations$": struct{}{},
184+
},
185+
},
178186
}
179187

180188
for _, test := range tests {

0 commit comments

Comments
 (0)