Skip to content

Commit

Permalink
Merge pull request #355 from alexander-demicev/removedowngrade
Browse files Browse the repository at this point in the history
🌱 Remove downgrade e2e tests
  • Loading branch information
k8s-ci-robot authored Dec 13, 2023
2 parents e3b4abe + c9a4091 commit 9e90310
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 54 deletions.
28 changes: 1 addition & 27 deletions test/e2e/air_gapped_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ var _ = Describe("Install Core Provider in an air-gapped environment", func() {
},
},
},
Version: "v1.4.2",
},
},
}
Expand All @@ -97,33 +98,6 @@ var _ = Describe("Install Core Provider in an air-gapped environment", func() {
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
})

It("should successfully downgrade a CoreProvider (latest -> v1.4.2)", func() {
bootstrapCluster := bootstrapClusterProxy.GetClient()
coreProvider := &operatorv1.CoreProvider{}
key := client.ObjectKey{Namespace: operatorNamespace, Name: coreProviderName}
Expect(bootstrapCluster.Get(ctx, key, coreProvider)).To(Succeed())

coreProvider.Spec.Version = previousCAPIVersion

Expect(bootstrapCluster.Update(ctx, coreProvider)).To(Succeed())

By("Waiting for the core provider deployment to be ready")
framework.WaitForDeploymentsAvailable(ctx, framework.WaitForDeploymentsAvailableInput{
Getter: bootstrapClusterProxy.GetClient(),
Deployment: &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{Name: coreProviderDeploymentName, Namespace: operatorNamespace}},
}, e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)

By("Waiting for core provider to be ready")
WaitFor(ctx, For(coreProvider).In(bootstrapCluster).ToSatisfy(
HaveStatusCondition(&coreProvider.Status.Conditions, operatorv1.ProviderInstalledCondition),
), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)

By("Waiting for status.IntalledVersion to be set")
WaitFor(ctx, For(coreProvider).In(bootstrapCluster).ToSatisfy(func() bool {
return ptr.Equal(coreProvider.Status.InstalledVersion, ptr.To(previousCAPIVersion))
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
})

It("should successfully upgrade a CoreProvider (v1.4.2 -> latest)", func() {
bootstrapCluster := bootstrapClusterProxy.GetClient()
coreProvider := &operatorv1.CoreProvider{}
Expand Down
27 changes: 0 additions & 27 deletions test/e2e/minimal_configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,33 +267,6 @@ metadata:
e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
})

It("should successfully downgrade a CoreProvider (latest -> v1.4.2)", func() {
bootstrapCluster := bootstrapClusterProxy.GetClient()
coreProvider := &operatorv1.CoreProvider{}
key := client.ObjectKey{Namespace: operatorNamespace, Name: coreProviderName}
Expect(bootstrapCluster.Get(ctx, key, coreProvider)).To(Succeed())

coreProvider.Spec.Version = previousCAPIVersion

Expect(bootstrapCluster.Update(ctx, coreProvider)).To(Succeed())

By("Waiting for the core provider deployment to be ready")
framework.WaitForDeploymentsAvailable(ctx, framework.WaitForDeploymentsAvailableInput{
Getter: bootstrapCluster,
Deployment: &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{Name: coreProviderDeploymentName, Namespace: operatorNamespace}},
}, e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)

By("Waiting for core provider to be ready and status.InstalledVersion to be set")
WaitFor(ctx, For(coreProvider).In(bootstrapCluster).ToSatisfy(
HaveStatusCondition(&coreProvider.Status.Conditions, operatorv1.ProviderInstalledCondition)),
e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)

By("Waiting for the core provider to have status.InstalledVersion to be set")
WaitFor(ctx, For(coreProvider).In(bootstrapCluster).ToSatisfy(func() bool {
return ptr.Equal(coreProvider.Status.InstalledVersion, &coreProvider.Spec.Version)
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
})

It("should successfully upgrade a CoreProvider (v1.4.2 -> latest)", func() {
bootstrapCluster := bootstrapClusterProxy.GetClient()
coreProvider := &operatorv1.CoreProvider{ObjectMeta: metav1.ObjectMeta{
Expand Down

0 comments on commit 9e90310

Please sign in to comment.