update testcase based on feedback

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This commit is contained in:
Tim Ramlot 2023-06-23 09:14:38 +02:00
parent 19377b43b1
commit 229f99c197
No known key found for this signature in database
GPG Key ID: 47428728E0C2878D

View File

@ -213,7 +213,7 @@ func Test_NewTriggerPolicyChain(t *testing.T) {
message: "Issuing certificate as Secret was previously issued by IssuerKind.new.example.com/testissuer",
reissue: true,
},
"trigger issuance as current CertificateRequest is not signed with private key": {
"trigger if the Secret contains a different private key than was used to sign the CSR": {
certificate: &cmapi.Certificate{Spec: cmapi.CertificateSpec{SecretName: "something"}},
secret: &corev1.Secret{ObjectMeta: metav1.ObjectMeta{Name: "something"},
Data: map[string][]byte{
@ -234,7 +234,7 @@ func Test_NewTriggerPolicyChain(t *testing.T) {
CommonName: "example.com",
}}),
}},
reason: InvalidCertificateRequest,
reason: SecretMismatch,
message: "Secret contains a private key that does not match the current CertificateRequest",
reissue: true,
},