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 30, 2024
1 parent 519faa3 commit 1fb8bff
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 @@ -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)
}
Expand All @@ -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)
}
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 1fb8bff

Please sign in to comment.