File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -308,6 +308,7 @@ func (f *Filter) UnmarshalYAML(unmarshal func(interface{}) error) error {
308308 if unmarshal (& value ) == nil {
309309 f .Type = Exact
310310 f .Value = value
311+ f .Group = "default"
311312 return nil
312313 }
313314
@@ -378,6 +379,7 @@ func NewExactFilter(value string) Filter {
378379 return Filter {
379380 Type : Exact ,
380381 Value : value ,
382+ Group : "default" ,
381383 }
382384}
383385
Original file line number Diff line number Diff line change @@ -485,6 +485,7 @@ func TestFilter_NewExactFilter(t *testing.T) {
485485 f := filter .NewExactFilter ("testing" )
486486
487487 assert .Equal (t , f .Type , filter .Exact )
488+ assert .Equal (t , f .Group , "default" )
488489
489490 b1 , err := f .Match ("testing" )
490491 assert .NoError (t , err )
@@ -523,6 +524,7 @@ func TestFilter_Validation(t *testing.T) {
523524 if tc .error {
524525 assert .Error (t , errValidate )
525526 } else {
527+ assert .Equal (t , "default" , f .Group )
526528 assert .NoError (t , errValidate )
527529 }
528530 })
You can’t perform that action at this time.
0 commit comments