mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 02:38:12 +00:00
Clarify that value arg to field.TooLong is unused
This commit is contained in:
@@ -206,7 +206,7 @@ func TestValidateCertificateSigningRequestCreate(t *testing.T) {
|
||||
},
|
||||
},
|
||||
errs: field.ErrorList{
|
||||
field.TooLong(specPath.Child("signerName"), maxLengthSignerName+".toolong", len(maxLengthSignerName)),
|
||||
field.TooLong(specPath.Child("signerName"), "", len(maxLengthSignerName)),
|
||||
},
|
||||
},
|
||||
"signerName with a fqdn greater than 253 characters should be rejected": {
|
||||
@@ -220,7 +220,7 @@ func TestValidateCertificateSigningRequestCreate(t *testing.T) {
|
||||
},
|
||||
},
|
||||
errs: field.ErrorList{
|
||||
field.TooLong(specPath.Child("signerName"), fmt.Sprintf("%s.extra", maxLengthFQDN), len(maxLengthFQDN)),
|
||||
field.TooLong(specPath.Child("signerName"), "", len(maxLengthFQDN)),
|
||||
},
|
||||
},
|
||||
"signerName can have a longer path if the domain component is less than the max length": {
|
||||
@@ -1137,7 +1137,7 @@ func TestValidateClusterTrustBundle(t *testing.T) {
|
||||
},
|
||||
},
|
||||
wantErrors: field.ErrorList{
|
||||
field.TooLong(field.NewPath("spec", "trustBundle"), fmt.Sprintf("<value omitted, len %d>", len(badTooBigBundle)), core.MaxSecretSize),
|
||||
field.TooLong(field.NewPath("spec", "trustBundle"), "", core.MaxSecretSize),
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user