mirror of https://github.com/k3s-io/k3s
fix error message in validation test
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