Skip to content

Commit

Permalink
Ensure bundles override is used for template generation if available
Browse files Browse the repository at this point in the history
  • Loading branch information
abhay-krishna committed Aug 30, 2024
1 parent 19e22e0 commit 390b36a
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions test/framework/vsphere.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 390b36a

Please sign in to comment.