From fc5b2a88dc9e759f934b8c0ba52b8afbf82c00e1 Mon Sep 17 00:00:00 2001 From: Abhay Krishna Arunachalam Date: Mon, 26 Aug 2024 18:09:20 -0700 Subject: [PATCH] Ensure bundles override is used for template generation if available --- test/framework/vsphere.go | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/test/framework/vsphere.go b/test/framework/vsphere.go index 3328c5a0d378..e4251911e62f 100644 --- a/test/framework/vsphere.go +++ b/test/framework/vsphere.go @@ -688,12 +688,21 @@ func (v *VSphere) searchTemplate(ctx context.Context, template string) (string, func readVersionsBundles(t testing.TB, release *releasev1.EksARelease, kubeVersion anywherev1.KubernetesVersion) *releasev1.VersionsBundle { reader := newFileReader() - b, err := releases.ReadBundlesForRelease(reader, release) - if err != nil { - t.Fatal(err) + var allBundles *releasev1.Bundles + var err error + if getBundlesOverride() == "true" { + allBundles, err = bundles.Read(reader, defaultBundleReleaseManifestFile) + if err != nil { + t.Fatal(err) + } + } else { + allBundles, err = releases.ReadBundlesForRelease(reader, release) + if err != nil { + t.Fatal(err) + } } - return bundles.VersionsBundleForKubernetesVersion(b, string(kubeVersion)) + return bundles.VersionsBundleForKubernetesVersion(allBundles, string(kubeVersion)) } func readVSphereConfig() (vsphereConfig, error) {