From 229f99c197b352c8274a1fe1e515b386df5e6a0a Mon Sep 17 00:00:00 2001 From: Tim Ramlot <42113979+inteon@users.noreply.github.com> Date: Fri, 23 Jun 2023 09:14:38 +0200 Subject: [PATCH] update testcase based on feedback Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> --- internal/controller/certificates/policies/checks_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/controller/certificates/policies/checks_test.go b/internal/controller/certificates/policies/checks_test.go index 26482dcc4..09aa477e9 100644 --- a/internal/controller/certificates/policies/checks_test.go +++ b/internal/controller/certificates/policies/checks_test.go @@ -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, },