Skip to content

Commit

Permalink
fix crd data loss e2e test
Browse files Browse the repository at this point in the history
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
  • Loading branch information
Per Goncalves da Silva committed Feb 9, 2024
1 parent 9ef6771 commit f6d5239
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/e2e/crd_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ var _ = Describe("CRD Versions", func() {
Expect(fetchedInstallPlan.Status.Phase).To(Equal(operatorsv1alpha1.InstallPlanPhaseComplete))
})

// issue:https://github.com/operator-framework/operator-lifecycle-manager/issues/2638
It("[FLAKE] blocks a CRD upgrade that could cause data loss", func() {
It("blocks a CRD upgrade that could cause data loss", func() {
By("checking the storage versions in the existing CRD status and the spec of the new CRD")

mainPackageName := genName("nginx-update2-")
Expand Down Expand Up @@ -275,7 +274,8 @@ var _ = Describe("CRD Versions", func() {
By("Check the error on the installplan - should be related to data loss and the CRD upgrade missing a stored version")
Eventually(func() (*operatorsv1alpha1.InstallPlan, error) {
return crc.OperatorsV1alpha1().InstallPlans(generatedNamespace.GetName()).Get(context.TODO(), s.Status.InstallPlanRef.Name, metav1.GetOptions{})
}).Should(And(
// the install plan retry time out is 60 seconds, so we should expect the install plan to be failed within 2 minutes
}).Within(2 * time.Minute).Should(And(
WithTransform(
func(v *operatorsv1alpha1.InstallPlan) operatorsv1alpha1.InstallPlanPhase {
return v.Status.Phase
Expand Down

0 comments on commit f6d5239

Please sign in to comment.