Skip to content

Commit 4e97ebf

Browse files
arun717cursoragent
andcommitted
test(e2e): use test namespace in CM-786 IstioCSR gRPC CSR SPIFFE URI
The multi-operand suite runs IstioCSR in multi-operand-istio, not istio-system. Build the SPIFFE ID from the actual namespace so grpcurl can obtain a certificate instead of retrying until timeout. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent a968d48 commit 4e97ebf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test/e2e/multiple_operands_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ func runCM786IstioCSRGRPCCertificateTest(ctx context.Context, clientset *kuberne
714714
_ = clientset.CoreV1().ConfigMaps(ns.Name).Delete(ctx, "proto-cm", metav1.DeleteOptions{})
715715
})
716716

717-
csr := generateCM786CSR()
717+
csr := generateCM786CSR(ns.Name)
718718
loader.CreateFromFile(AssetFunc(testassets.ReadFile).WithTemplateValues(
719719
IstioCSRGRPCurlJobConfig{
720720
CertificateSigningRequest: csr,
@@ -784,15 +784,15 @@ func runCM786ServiceMeshIstioCSRIntegrationTest(ctx context.Context, clientset *
784784
}, lowTimeout, fastPollInterval).Should(Succeed())
785785
}
786786

787-
func generateCM786CSR() string {
787+
func generateCM786CSR(istioNamespace string) string {
788788
csrTemplate := &x509.CertificateRequest{
789789
Subject: pkix.Name{
790790
Organization: []string{"CM-786"},
791791
OrganizationalUnit: []string{"cert-manager-operator-e2e"},
792792
Country: []string{"US"},
793793
},
794794
URIs: []*url.URL{
795-
{Scheme: "spiffe", Host: "cluster.local", Path: "/ns/istio-system/sa/cert-manager-istio-csr"},
795+
{Scheme: "spiffe", Host: "cluster.local", Path: fmt.Sprintf("/ns/%s/sa/cert-manager-istio-csr", istioNamespace)},
796796
},
797797
SignatureAlgorithm: x509.SHA256WithRSA,
798798
}

0 commit comments

Comments
 (0)