Skip to content

Commit

Permalink
patch subscription e2e flake (#3302)
Browse files Browse the repository at this point in the history
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
Co-authored-by: Per Goncalves da Silva <pegoncal@redhat.com>
  • Loading branch information
perdasilva and Per Goncalves da Silva authored Jun 1, 2024
1 parent a5230c7 commit 1404e91
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions test/e2e/subscription_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2605,7 +2605,7 @@ var _ = Describe("Subscription", func() {
sub, err = fetchSubscription(crc, generatedNamespace.GetName(), subName, subscriptionStateAtLatestChecker())
Expect(err).Should(BeNil())

By("waiting for the subscription to have v0.3.0 installed without a bundle deprecated condition")
By("waiting for the install plan pending to go away")
sub, err = fetchSubscription(crc, generatedNamespace.GetName(), subName,
subscriptionHasCondition(
operatorsv1alpha1.SubscriptionInstallPlanPending,
Expand All @@ -2616,14 +2616,23 @@ var _ = Describe("Subscription", func() {
)
Expect(err).Should(BeNil())

By("waiting for the subscription to have v0.3.0 installed without a bundle deprecated condition")
sub, err = fetchSubscription(crc, generatedNamespace.GetName(), subName,
subscriptionHasCondition(
operatorsv1alpha1.SubscriptionBundleDeprecated,
corev1.ConditionUnknown,
"",
"",
),
)
Expect(err).Should(BeNil())

By("checking for the deprecated conditions")
By(`Operator is deprecated at only Package and Channel levels`)
packageCondition := sub.Status.GetCondition(operatorsv1alpha1.SubscriptionPackageDeprecated)
Expect(packageCondition.Status).To(Equal(corev1.ConditionTrue))
channelCondition := sub.Status.GetCondition(operatorsv1alpha1.SubscriptionChannelDeprecated)
Expect(channelCondition.Status).To(Equal(corev1.ConditionTrue))
bundleCondition = sub.Status.GetCondition(operatorsv1alpha1.SubscriptionBundleDeprecated)
Expect(bundleCondition.Status).To(Equal(corev1.ConditionUnknown))

By("verifying that a roll-up condition is present not containing bundle deprecation condition")
By(`Roll-up condition should be present and contain deprecation messages from Package and Channel levels`)
Expand Down

0 comments on commit 1404e91

Please sign in to comment.