Skip to content
Closed
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
29 changes: 14 additions & 15 deletions openshift/tests-extension/test/olmv1-singleownnamespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -740,20 +740,19 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMOwnSingleNamespace] OLMv1 ope
helpers.EnsureCleanupClusterExtension(context.Background(), ceName, namespace)
})

By("waiting for the ClusterExtension installation to fail due to invalid watch namespace")
Eventually(func(g Gomega) {
var ext olmv1.ClusterExtension
err := k8sClient.Get(ctx, client.ObjectKey{Name: ceName}, &ext)
g.Expect(err).ToNot(HaveOccurred(), "failed to get ClusterExtension %q", ceName)

conditions := ext.Status.Conditions
g.Expect(conditions).ToNot(BeEmpty(), "ClusterExtension %q has empty status.conditions", ceName)

installed := meta.FindStatusCondition(conditions, olmv1.TypeInstalled)
g.Expect(installed).ToNot(BeNil(), "Installed condition not found")
g.Expect(installed.Status).To(Equal(metav1.ConditionFalse), "Installed should be False")
g.Expect(installed.Reason).To(Equal(olmv1.ReasonFailed))
g.Expect(installed.Message).ToNot(BeEmpty())
}).WithTimeout(helpers.DefaultTimeout).WithPolling(helpers.DefaultPolling).Should(Succeed())
By("waiting for the ClusterExtension to report invalid configuration")
Eventually(func(g Gomega) {
var ext olmv1.ClusterExtension
err := k8sClient.Get(ctx, client.ObjectKey{Name: ceName}, &ext)
g.Expect(err).ToNot(HaveOccurred(), "failed to get ClusterExtension %q", ceName)

conditions := ext.Status.Conditions
g.Expect(conditions).ToNot(BeEmpty(), "ClusterExtension %q has empty status.conditions", ceName)

progressing := meta.FindStatusCondition(conditions, olmv1.TypeProgressing)
g.Expect(progressing).ToNot(BeNil(), "Progressing condition not found")
g.Expect(progressing.Status).To(Equal(metav1.ConditionFalse), "Progressing should be False")
g.Expect(progressing.Reason).To(Equal("InvalidConfiguration"))
}).WithTimeout(helpers.DefaultTimeout).WithPolling(helpers.DefaultPolling).Should(Succeed())
})
})