Skip to content

Commit

Permalink
test: permit specifying multiple comma-separated SAN
Browse files Browse the repository at this point in the history
[skip ci]

Signed-off-by: Clément Nussbaumer <[email protected]>
  • Loading branch information
clementnuss committed Mar 29, 2023
1 parent 89f5330 commit 5bda15b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/controller/testenv_setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"encoding/pem"
"net"
"os"
"strings"
"testing"
"time"

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 5bda15b

Please sign in to comment.