From 5bda15bdd66ac4246b16ba3d60db62bb6175228a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Nussbaumer?= Date: Wed, 29 Mar 2023 14:52:07 +0200 Subject: [PATCH] test: permit specifying multiple comma-separated SAN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [skip ci] Signed-off-by: Clément Nussbaumer --- internal/controller/testenv_setup_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/controller/testenv_setup_test.go b/internal/controller/testenv_setup_test.go index 9dffa2a..3dc2992 100644 --- a/internal/controller/testenv_setup_test.go +++ b/internal/controller/testenv_setup_test.go @@ -21,6 +21,7 @@ import ( "encoding/pem" "net" "os" + "strings" "testing" "time" @@ -141,7 +142,7 @@ func createCsr(t *testing.T, params CsrParams) certificates_v1.CertificateSignin IPAddresses: params.ipAddresses, } if len(params.dnsName) > 0 { - x509RequestTemplate.DNSNames = []string{params.dnsName} + x509RequestTemplate.DNSNames = strings.Split(params.dnsName, ",") } x509Request, _ := x509.CreateCertificateRequest(rand.Reader, &x509RequestTemplate, priv)