Fix up ErrorMatcher from feedback
a) Rename the type and drop the constructor b) Make MatchErrors() into a Test() method For followup: c) Consider making ByType() assumed d) Consider making ByField() assumed and handle nil as "don't care" e) Consider making ByValue() assumed and handle nil as "don't care" Kubernetes-commit: 0a9f492eedf6dd68fee12e4606d3fef4d608d88f
This commit is contained in:
parent
163865fa38
commit
0b0eaa35e1
|
@ -154,7 +154,8 @@ func TestValidateDeclaratively(t *testing.T) {
|
|||
} else {
|
||||
results = ValidateUpdateDeclaratively(ctx, tc.options, scheme, tc.object, tc.oldObject)
|
||||
}
|
||||
fieldtesting.MatchErrors(t, tc.expected, results, fieldtesting.Match().ByType().ByField().ByOrigin())
|
||||
matcher := fieldtesting.ErrorMatcher{}.ByType().ByField().ByOrigin()
|
||||
matcher.Test(t, tc.expected, results)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue