Skip to content

🌱 Remove redundant self-hosted and clusterctl upgrade tests #11073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 0 additions & 58 deletions test/e2e/clusterctl_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,38 +218,6 @@ var _ = Describe("When testing clusterctl upgrades (v1.0=>current)", func() {
})
})

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests are a subset of the corresponding tests with ClusterClass

// Note: This test should be changed during "prepare main branch", it should test n-2 => current.
var _ = Describe("When testing clusterctl upgrades (v1.7=>current)", 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)
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),
// We have to pin the providers because with `InitWithProvidersContract` the test would
// use the latest version for the contract (which is the next minor for v1beta1).
InitWithCoreProvider: fmt.Sprintf(providerCAPIPrefix, stableRelease),
InitWithBootstrapProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease)},
InitWithControlPlaneProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease)},
InitWithInfrastructureProviders: []string{fmt.Sprintf(providerDockerPrefix, stableRelease)},
InitWithProvidersContract: "v1beta1",
// Note: Both InitWithKubernetesVersion and WorkloadKubernetesVersion should be the highest mgmt cluster version supported by the source Cluster API version.
InitWithKubernetesVersion: "v1.30.0",
WorkloadKubernetesVersion: "v1.30.0",
MgmtFlavor: "topology",
WorkloadFlavor: "",
UseKindForManagementCluster: true,
}
})
})

// Note: This test should be changed during "prepare main branch", it should test n-2 => current.
var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.7=>current) [ClusterClass]", func() {
// Get v1.7 latest stable release
Expand Down Expand Up @@ -282,32 +250,6 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.7=>cur
})
})

// Note: This test should be changed during "prepare main branch", it should test n-1 => current.
var _ = Describe("When testing clusterctl upgrades (v1.8=>current)", func() {
// Get v1.8 latest stable release
version := "1.8"
stableRelease, err := GetStableReleaseOfMinor(ctx, version)
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", version)
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: Both InitWithKubernetesVersion and WorkloadKubernetesVersion should be the highest mgmt cluster version supported by the source Cluster API version.
InitWithKubernetesVersion: "v1.31.0",
WorkloadKubernetesVersion: "v1.31.0",
MgmtFlavor: "topology",
WorkloadFlavor: "",
UseKindForManagementCluster: true,
}
})
})

// Note: This test should be changed during "prepare main branch", it should test n-1 => current.
var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.8=>current) [ClusterClass]", func() {
// Get v1.8 latest stable release
Expand Down
13 changes: 0 additions & 13 deletions test/e2e/self_hosted_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,6 @@ import (
"k8s.io/utils/ptr"
)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coverage this test provides is a subset of When testing Cluster API working on self-hosted clusters using ClusterClass [ClusterClass]

var _ = Describe("When testing Cluster API working on self-hosted clusters", func() {
SelfHostedSpec(ctx, func() SelfHostedSpecInput {
return SelfHostedSpecInput{
E2EConfig: e2eConfig,
ClusterctlConfigPath: clusterctlConfigPath,
BootstrapClusterProxy: bootstrapClusterProxy,
ArtifactFolder: artifactFolder,
SkipCleanup: skipCleanup,
InfrastructureProvider: ptr.To("docker"),
}
})
})

var _ = Describe("When testing Cluster API working on self-hosted clusters using ClusterClass [ClusterClass]", func() {
SelfHostedSpec(ctx, func() SelfHostedSpecInput {
return SelfHostedSpecInput{
Expand Down
Loading