Skip to content

Commit

Permalink
test: add coverage to find issues running on the next kubernetes rele…
Browse files Browse the repository at this point in the history
…ase as management cluster
  • Loading branch information
chrischdi committed Aug 1, 2024
1 parent ab7bac8 commit 7ab1cee
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/e2e/clusterctl_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"k8s.io/utils/ptr"

clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
"sigs.k8s.io/cluster-api/test/framework/kubernetesversions"
)

var (
Expand Down Expand Up @@ -325,3 +326,31 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.7=>cur
}
})
})

var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.7=>current) on latest management cluster [ClusterClass]", func() {
// Get v1.7 latest stable release
version := "1.7"
stableRelease, err := GetStableReleaseOfMinor(ctx, version)
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", version)
initKubernetesVersion, err := kubernetesversions.ResolveVersion(ctx, e2eConfig.GetVariable("KUBERNETES_VERSION_LATEST_CI"))
Expect(err).NotTo(HaveOccurred())
ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput {
return ClusterctlUpgradeSpecInput{
E2EConfig: e2eConfig,
ClusterctlConfigPath: clusterctlConfigPath,
BootstrapClusterProxy: bootstrapClusterProxy,
ArtifactFolder: artifactFolder,
SkipCleanup: skipCleanup,
InfrastructureProvider: ptr.To("docker"),
InitWithBinary: fmt.Sprintf(clusterctlDownloadURL, stableRelease),
InitWithProvidersContract: "v1beta1",
// Note: InitWithKubernetesVersion should be the latest of the next supported kubernetes version by the the target Cluster API version.

Check failure on line 347 in test/e2e/clusterctl_upgrade_test.go

View workflow job for this annotation

GitHub Actions / lint (test)

Duplicate words (the) found (dupword)
// Note: WorkloadKubernetesVersion should be the highest mgmt cluster version supported by the source Cluster API version.
InitWithKubernetesVersion: initKubernetesVersion,
WorkloadKubernetesVersion: "v1.30.0",
MgmtFlavor: "topology",
WorkloadFlavor: "topology",
UseKindForManagementCluster: true,
}
})
})

0 comments on commit 7ab1cee

Please sign in to comment.