/area API
/kind bug
Steps to Reproduce the Problem
Using "warning" level error introduced in #2498:
func TestFoo(t *testing.T) {
var errs *apis.FieldError
errs = errs.Also(apis.FieldError("foo").At(apis.WarningLevel))
if errs.Level != apis.WarningLevel {
t.Errorf("Expected an error at warning level but got level %s", errs.Level)
}
}
Expected Behavior
The aggregated error has the level that is the highest level of any errors combined with Also.
In the example above, I would expect errs.Level to be Warning, and errs.Filter(apis.WarningLevel).Level to also be Warning.
Actual Behavior
In the example above, errs.Level and errs.Filter(apis.WarningLevel).Level are both Error. (i.e. an error at level "warning" aggregated with no error turns into an error at level "error")
@mattmoor
/area API
/kind bug
Steps to Reproduce the Problem
Using "warning" level error introduced in #2498:
Expected Behavior
The aggregated error has the level that is the highest level of any errors combined with
Also.In the example above, I would expect
errs.Levelto be Warning, anderrs.Filter(apis.WarningLevel).Levelto also be Warning.Actual Behavior
In the example above,
errs.Levelanderrs.Filter(apis.WarningLevel).Levelare both Error. (i.e. an error at level "warning" aggregated with no error turns into an error at level "error")@mattmoor