mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
fix error message in validation test
This commit is contained in:
parent
3a62089790
commit
7ffe791486
@ -28,8 +28,8 @@ import (
|
||||
|
||||
func expectPrefix(t *testing.T, prefix string, errs errors.ErrorList) {
|
||||
for i := range errs {
|
||||
if !strings.HasPrefix(errs[i].(errors.ValidationError).Field, prefix) {
|
||||
t.Errorf("expected prefix '%s' for %v", errs[i])
|
||||
if f, p := errs[i].(errors.ValidationError).Field, prefix; !strings.HasPrefix(f, p) {
|
||||
t.Errorf("expected prefix '%s' for field '%s' (%v)", p, f, errs[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user