From 3351576533e2090ccd72b65f4b40c2b0bf651cb4 Mon Sep 17 00:00:00 2001 From: Justin Kulikauskas Date: Mon, 17 Jun 2024 15:02:46 -0400 Subject: [PATCH] Update quay version in test When we have fake operators we can control for our tests, we won't have this kind of problem. Signed-off-by: Justin Kulikauskas --- test/e2e/case38_install_operator_test.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/e2e/case38_install_operator_test.go b/test/e2e/case38_install_operator_test.go index a70ca4ce..3cf97e0b 100644 --- a/test/e2e/case38_install_operator_test.go +++ b/test/e2e/case38_install_operator_test.go @@ -3552,8 +3552,9 @@ var _ = Describe("Testing OperatorPolicy", Ordered, Label("supports-hosted"), fu }) Describe("Test reporting of unapproved version after installation", func() { const ( - opPolYAML = "../resources/case38_operator_install/operator-policy-no-group-enforce.yaml" - opPolName = "oppol-no-group-enforce" + opPolYAML = "../resources/case38_operator_install/operator-policy-no-group-enforce.yaml" + opPolName = "oppol-no-group-enforce" + latestQuay310 = "quay-operator.v3.10.6" ) BeforeEach(func() { @@ -3566,7 +3567,7 @@ var _ = Describe("Testing OperatorPolicy", Ordered, Label("supports-hosted"), fu It("Should start compliant", func(ctx SpecContext) { Eventually(func(ctx SpecContext) string { csv, _ := targetK8sDynamic.Resource(gvrClusterServiceVersion).Namespace(opPolTestNS). - Get(ctx, "quay-operator.v3.10.5", metav1.GetOptions{}) + Get(ctx, latestQuay310, metav1.GetOptions{}) if csv == nil { return "" @@ -3614,17 +3615,17 @@ var _ = Describe("Testing OperatorPolicy", Ordered, Label("supports-hosted"), fu APIVersion: "operators.coreos.com/v1alpha1", Metadata: policyv1.ObjectMetadata{ Namespace: opPolTestNS, - Name: "quay-operator.v3.10.5", + Name: latestQuay310, }, }, Compliant: "NonCompliant", - Reason: "ClusterServiceVersion (quay-operator.v3.10.5) is not an approved version", + Reason: "ClusterServiceVersion (" + latestQuay310 + ") is not an approved version", }}, metav1.Condition{ Type: "ClusterServiceVersionCompliant", Status: metav1.ConditionFalse, Reason: "UnapprovedVersion", - Message: "ClusterServiceVersion (quay-operator.v3.10.5) is not an approved version", + Message: "ClusterServiceVersion (" + latestQuay310 + ") is not an approved version", }, "ClusterServiceVersion .* is not an approved version", )