Skip to content

Commit a876e2b

Browse files
committed
test: add coverage to find issues running on the next kubernetes release as management cluster
1 parent ab7bac8 commit a876e2b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

test/e2e/clusterctl_upgrade_test.go

+29
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"k8s.io/utils/ptr"
2929

3030
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
31+
"sigs.k8s.io/cluster-api/test/framework/kubernetesversions"
3132
)
3233

3334
var (
@@ -325,3 +326,31 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.7=>cur
325326
}
326327
})
327328
})
329+
330+
var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.7=>current) on latest management cluster [ClusterClass]", func() {
331+
// Get v1.7 latest stable release
332+
version := "1.7"
333+
stableRelease, err := GetStableReleaseOfMinor(ctx, version)
334+
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", version)
335+
ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput {
336+
initKubernetesVersion, err := kubernetesversions.ResolveVersion(ctx, e2eConfig.GetVariable("KUBERNETES_VERSION_LATEST_CI"))
337+
Expect(err).ToNot(HaveOccurred())
338+
return ClusterctlUpgradeSpecInput{
339+
E2EConfig: e2eConfig,
340+
ClusterctlConfigPath: clusterctlConfigPath,
341+
BootstrapClusterProxy: bootstrapClusterProxy,
342+
ArtifactFolder: artifactFolder,
343+
SkipCleanup: skipCleanup,
344+
InfrastructureProvider: ptr.To("docker"),
345+
InitWithBinary: fmt.Sprintf(clusterctlDownloadURL, stableRelease),
346+
InitWithProvidersContract: "v1beta1",
347+
// Note: InitWithKubernetesVersion should be the latest of the next supported kubernetes version by the target Cluster API version.
348+
// Note: WorkloadKubernetesVersion should be the highest mgmt cluster version supported by the source Cluster API version.
349+
InitWithKubernetesVersion: initKubernetesVersion,
350+
WorkloadKubernetesVersion: "v1.30.0",
351+
MgmtFlavor: "topology",
352+
WorkloadFlavor: "topology",
353+
UseKindForManagementCluster: true,
354+
}
355+
})
356+
})

0 commit comments

Comments
 (0)