Skip to content

Commit

Permalink
Add e2e test for inplace upgrade from latest release (#7597)
Browse files Browse the repository at this point in the history
  • Loading branch information
sp1999 authored Feb 16, 2024
1 parent 312a525 commit 5a93099
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/e2e/upgrade_from_latest.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ func runUpgradeWithFluxFromReleaseFlow(test *framework.ClusterE2ETest, latestRel
test.DeleteCluster()
}

func runInPlaceUpgradeFromReleaseFlow(test *framework.ClusterE2ETest, latestRelease *releasev1.EksARelease, clusterOpts ...framework.ClusterE2ETestOpt) {
test.CreateCluster(framework.ExecuteWithEksaRelease(latestRelease))
test.UpgradeClusterWithNewConfig(clusterOpts)
test.ValidateClusterState()
test.StopIfFailed()
test.DeleteCluster()
}

func runMulticlusterUpgradeFromReleaseFlowAPI(test *framework.MulticlusterE2ETest, release *releasev1.EksARelease, kubeVersion anywherev1.KubernetesVersion, os framework.OS) {
provider := test.ManagementCluster.Provider
test.CreateManagementCluster(framework.ExecuteWithEksaRelease(release))
Expand Down
35 changes: 35 additions & 0 deletions test/e2e/vsphere_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3336,6 +3336,41 @@ func TestVSphereKubernetes128To129UbuntuUpgradeFromLatestMinorRelease(t *testing
)
}

func TestVSphereKubernetes128To129UbuntuInPlaceUpgradeFromLatestMinorRelease(t *testing.T) {
release := latestMinorRelease(t)
provider := framework.NewVSphere(
t,
framework.WithVSphereFillers(
api.WithOsFamilyForAllMachines(v1alpha1.Ubuntu),
),
framework.WithKubeVersionAndOSForRelease(v1alpha1.Kube128, framework.Ubuntu2004, release),
)
test := framework.NewClusterE2ETest(
t,
provider,
framework.WithEnvVar(features.VSphereInPlaceEnvVar, "true"),
)
test.GenerateClusterConfigForVersion(release.Version, framework.ExecuteWithEksaRelease(release))
test.UpdateClusterConfig(
api.ClusterToConfigFiller(
api.WithKubernetesVersion(v1alpha1.Kube128),
api.WithStackedEtcdTopology(),
),
api.VSphereToConfigFiller(
api.RemoveEtcdVsphereMachineConfig(),
),
)
runInPlaceUpgradeFromReleaseFlow(
test,
release,
framework.WithClusterUpgrade(
api.WithKubernetesVersion(v1alpha1.Kube129),
api.WithInPlaceUpgradeStrategy(),
),
provider.WithProviderUpgrade(provider.Ubuntu129Template()),
)
}

func TestVSphereKubernetes128BottlerocketAndRemoveWorkerNodeGroups(t *testing.T) {
provider := framework.NewVSphere(t,
framework.WithVSphereWorkerNodeGroup(
Expand Down

0 comments on commit 5a93099

Please sign in to comment.