From 1fb8bff2d1e19f9ece14055ed95dc9ca369f981d Mon Sep 17 00:00:00 2001 From: Aravind Ramalingam Date: Mon, 16 Sep 2024 10:11:24 -0700 Subject: [PATCH] Adding oci namespaces for registry mirror packages tests --- test/e2e/vsphere_test.go | 10 ++++++++++ test/framework/registry_mirror.go | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/test/e2e/vsphere_test.go b/test/e2e/vsphere_test.go index ed0e08cbb687..f620a5d4b0f0 100644 --- a/test/e2e/vsphere_test.go +++ b/test/e2e/vsphere_test.go @@ -2519,6 +2519,11 @@ func TestVSphereKubernetes129UbuntuAuthenticatedRegistryMirrorCuratedPackagesSim framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube129), EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + framework.WithRegistryMirrorOciNamespaces(constants.VSphereProviderName, + v1alpha1.OCINamespace{ + Registry: "857151390494.dkr.ecr.us-west-2.amazonaws.com", + Namespace: "", + }), ) runCuratedPackageInstallSimpleFlowRegistryMirror(test) } @@ -2536,6 +2541,11 @@ func TestVSphereKubernetes130UbuntuAuthenticatedRegistryMirrorCuratedPackagesSim framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube130), EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + framework.WithRegistryMirrorOciNamespaces(constants.VSphereProviderName, + v1alpha1.OCINamespace{ + Registry: "857151390494.dkr.ecr.us-west-2.amazonaws.com", + Namespace: "", + }), ) runCuratedPackageInstallSimpleFlowRegistryMirror(test) } diff --git a/test/framework/registry_mirror.go b/test/framework/registry_mirror.go index c39fcec9efb3..6f3c8c3c307d 100644 --- a/test/framework/registry_mirror.go +++ b/test/framework/registry_mirror.go @@ -65,7 +65,7 @@ func WithRegistryMirrorEndpointAndCert(providerName string) ClusterE2ETestOpt { } // WithRegistryMirrorOciNamespaces sets up e2e for registry mirrors with ocinamespaces. -func WithRegistryMirrorOciNamespaces(providerName string) ClusterE2ETestOpt { +func WithRegistryMirrorOciNamespaces(providerName string, optNamespaces ...v1alpha1.OCINamespace) ClusterE2ETestOpt { return func(e *ClusterE2ETest) { var ociNamespaces []v1alpha1.OCINamespace @@ -84,6 +84,8 @@ func WithRegistryMirrorOciNamespaces(providerName string) ClusterE2ETestOpt { }) } + ociNamespaces = append(ociNamespaces, optNamespaces...) + setupRegistryMirrorEndpointAndCert(e, providerName, false, ociNamespaces...) } }