Add extra testcase
This commit is contained in:
parent
db5383051e
commit
474c8ed27f
@ -42,6 +42,17 @@ func TestValidateCertificateForACMEIssuer(t *testing.T) {
|
||||
KeyAlgorithm: v1alpha1.RSAKeyAlgorithm,
|
||||
},
|
||||
},
|
||||
"certificate with incorrect keyAlgorithm for ACME": {
|
||||
spec: &v1alpha1.CertificateSpec{
|
||||
CommonName: "testcn",
|
||||
SecretName: "abc",
|
||||
IssuerRef: validIssuerRef,
|
||||
KeyAlgorithm: v1alpha1.ECDSAKeyAlgorithm,
|
||||
},
|
||||
errs: []*field.Error{
|
||||
field.Invalid(fldPath.Child("keyAlgorithm"), v1alpha1.ECDSAKeyAlgorithm, "ACME key algorithm must be RSA"),
|
||||
},
|
||||
},
|
||||
}
|
||||
for n, s := range scenarios {
|
||||
t.Run(n, func(t *testing.T) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user