From 0aa2f148ff46ab275c1f45f2cfea20618da97b8a Mon Sep 17 00:00:00 2001 From: Zadkiel AHARONIAN Date: Mon, 6 Jan 2025 11:54:02 +0100 Subject: [PATCH 1/2] test: certificate commonName to null --- application/tests/certificate_test.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/application/tests/certificate_test.yaml b/application/tests/certificate_test.yaml index 271f0b0e..6559bc8a 100644 --- a/application/tests/certificate_test.yaml +++ b/application/tests/certificate_test.yaml @@ -23,6 +23,24 @@ tests: - hasDocuments: count: 0 + - it: does not set Certificate cname if commonName is set to null + set: + certificate: + enabled: true + dnsNames: + - a.com + commonName: null + capabilities: + apiVersions: + - cert-manager.io/v1 + asserts: + - hasDocuments: + count: 1 + - isKind: + of: Certificate + - notExists: + path: spec.commonName + - it: yields Certificate resource if enabled and API version is available set: certificate: From 3f0f85582717c9845d18dc970123338c1ce1e032 Mon Sep 17 00:00:00 2001 From: Zadkiel AHARONIAN Date: Mon, 6 Jan 2025 12:11:03 +0100 Subject: [PATCH 2/2] Update certificate_test.yaml --- application/tests/certificate_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/tests/certificate_test.yaml b/application/tests/certificate_test.yaml index 6559bc8a..15aea26a 100644 --- a/application/tests/certificate_test.yaml +++ b/application/tests/certificate_test.yaml @@ -38,7 +38,7 @@ tests: count: 1 - isKind: of: Certificate - - notExists: + - isNullOrEmpty: path: spec.commonName - it: yields Certificate resource if enabled and API version is available