Skip to content

Commit

Permalink
🌱 patch flakes (#3281)
Browse files Browse the repository at this point in the history
* patch flakes

Signed-off-by: Per Goncalves da Silva <[email protected]>

* Update test/e2e/subscription_e2e_test.go

Co-authored-by: Mikalai Radchuk <[email protected]>

---------

Signed-off-by: Per Goncalves da Silva <[email protected]>
Co-authored-by: Per Goncalves da Silva <[email protected]>
Co-authored-by: Mikalai Radchuk <[email protected]>
  • Loading branch information
3 people authored May 27, 2024
1 parent 1f5e0dc commit 161b89c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/operators/olm/operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4030,7 +4030,7 @@ func TestUpdates(t *testing.T) {
csvsToSync = syncCSVs(csvsToSync, deletedCSVs(e.shouldBe))
current = csvsToSync[e.whenIn.name]
fmt.Printf("waiting for (when) %s to be %s\n", e.whenIn.name, e.whenIn.phase)
time.Sleep(1 * time.Millisecond)
time.Sleep(1 * time.Second)
}

// sync the other csvs until they're in the expected status
Expand Down
18 changes: 12 additions & 6 deletions test/e2e/subscription_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2597,14 +2597,20 @@ var _ = Describe("Subscription", func() {
err = magicCatalog.UpdateCatalog(context.Background(), provider)
Expect(err).To(BeNil())

By("waiting for the subscription to have v0.3.0 installed with a Package deprecated condition")
sub, err = fetchSubscription(crc, generatedNamespace.GetName(), subName, subscriptionHasCondition(
operatorsv1alpha1.SubscriptionPackageDeprecated,
corev1.ConditionTrue,
"",
"olm.package/test-package: test-package has been deprecated. Please switch to another-package."))
By("waiting for the subscription to have v0.3.0 installed")
sub, err = fetchSubscription(crc, generatedNamespace.GetName(), subName, subscriptionHasCurrentCSV("example-operator.v0.3.0"))
Expect(err).Should(BeNil())

By("waiting for the subscription to have v0.3.0 installed with a Package deprecated condition")
sub, err = fetchSubscription(crc, generatedNamespace.GetName(), subName,
subscriptionHasCondition(
operatorsv1alpha1.SubscriptionPackageDeprecated,
corev1.ConditionTrue,
"",
"olm.package/test-package: test-package has been deprecated. Please switch to another-package.",
),
)

By("checking for the deprecated conditions")
By(`Operator is deprecated at only Package and Channel levels`)
packageCondition := sub.Status.GetCondition(operatorsv1alpha1.SubscriptionPackageDeprecated)
Expand Down

0 comments on commit 161b89c

Please sign in to comment.