File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,41 @@ another line here`,
202202 want : map [string ]string {
203203 "data/datacollectorname" : `abc 123
204204another line here
205+ ` ,
206+ },
207+ },
208+ {
209+ name : "custom multiline redactor" ,
210+ Collect : & troubleshootv1beta1.Collect {
211+ Data : & troubleshootv1beta1.Data {
212+ CollectorMeta : troubleshootv1beta1.CollectorMeta {
213+ CollectorName : "datacollectorname" ,
214+ Exclude : multitype.BoolOrString {},
215+ },
216+ Name : "data" ,
217+ Data : `xyz123
218+ abc
219+ xyz123
220+ xyz123
221+ abc` ,
222+ },
223+ },
224+ Redactors : []* troubleshootv1beta1.Redact {
225+ {
226+ MultiLine : []troubleshootv1beta1.MultiLine {
227+ {
228+ Selector : "abc" ,
229+ Redactor : "xyz(123)" ,
230+ },
231+ },
232+ },
233+ },
234+ want : map [string ]string {
235+ "data/datacollectorname" : `xyz123
236+ abc
237+ 123
238+ xyz123
239+ abc
205240` ,
206241 },
207242 },
You can’t perform that action at this time.
0 commit comments