Skip to content

Commit

Permalink
Adding oci namespaces for registry mirror packages tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pokearu committed Sep 16, 2024
1 parent d93640b commit 746257f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions test/e2e/vsphere_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2475,6 +2475,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)
}
Expand All @@ -2492,6 +2497,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)
}
Expand Down
4 changes: 3 additions & 1 deletion test/framework/registry_mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -84,6 +84,8 @@ func WithRegistryMirrorOciNamespaces(providerName string) ClusterE2ETestOpt {
})
}

ociNamespaces = append(ociNamespaces, optNamespaces...)

setupRegistryMirrorEndpointAndCert(e, providerName, false, ociNamespaces...)
}
}
Expand Down

0 comments on commit 746257f

Please sign in to comment.