Skip to content

Commit

Permalink
Use a newer quay version for operatorpolicy tests
Browse files Browse the repository at this point in the history
From some test runs, it seems like some of the 3.8.x releases do not
always have the quayecosystems CRD, which makes the tests inconsistent.
From what I can tell, *none* of the 3.10.x releases will have that CRD,
so it should be consistent.

Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
  • Loading branch information
JustinKuli committed Apr 30, 2024
1 parent 60fac16 commit 02e8326
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 45 deletions.
30 changes: 0 additions & 30 deletions test/e2e/case38_install_operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1374,16 +1374,6 @@ var _ = Describe("Testing OperatorPolicy", Ordered, func() {
},
Compliant: "Compliant",
Reason: "Resource found as expected",
}, {
Object: policyv1.ObjectResource{
Kind: "CustomResourceDefinition",
APIVersion: "apiextensions.k8s.io/v1",
Metadata: policyv1.ObjectMetadata{
Name: "quayecosystems.redhatcop.redhat.io",
},
},
Compliant: "Compliant",
Reason: "Resource found as expected",
}},
metav1.Condition{
Type: "CustomResourceDefinitionCompliant",
Expand Down Expand Up @@ -1821,16 +1811,6 @@ var _ = Describe("Testing OperatorPolicy", Ordered, func() {
opPolName,
true,
[]policyv1.RelatedObject{{
Object: policyv1.ObjectResource{
Kind: "CustomResourceDefinition",
APIVersion: "apiextensions.k8s.io/v1",
Metadata: policyv1.ObjectMetadata{
Name: "quayecosystems.redhatcop.redhat.io",
},
},
Compliant: "NonCompliant",
Reason: "Resource found but should not exist",
}, {
Object: policyv1.ObjectResource{
Kind: "CustomResourceDefinition",
APIVersion: "apiextensions.k8s.io/v1",
Expand Down Expand Up @@ -1922,16 +1902,6 @@ var _ = Describe("Testing OperatorPolicy", Ordered, func() {
opPolName,
false,
[]policyv1.RelatedObject{{
Object: policyv1.ObjectResource{
Kind: "CustomResourceDefinition",
APIVersion: "apiextensions.k8s.io/v1",
Metadata: policyv1.ObjectMetadata{
Name: "quayecosystems.redhatcop.redhat.io",
},
},
Reason: "The CustomResourceDefinition is attached to a mustnothave policy, but " +
"does not need to be removed",
}, {
Object: policyv1.ObjectResource{
Kind: "CustomResourceDefinition",
APIVersion: "apiextensions.k8s.io/v1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ spec:
severity: medium
complianceType: mustnothave
subscription:
channel: stable-3.8
channel: stable-3.10
name: project-quay
namespace: operator-policy-testns
installPlanApproval: Manual
source: operatorhubio-catalog
sourceNamespace: olm
startingCSV: quay-operator.v3.8.13
startingCSV: quay-operator.v3.10.0
versions:
- quay-operator.v3.8.13
- quay-operator.v3.10.0
removalBehavior:
operatorGroups: DeleteIfUnused
subscriptions: Delete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
severity: medium
complianceType: musthave
subscription:
channel: stable-3.8
channel: stable-3.10
name: project-quay-does-not-exist
namespace: operator-policy-testns
installPlanApproval: Automatic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ spec:
severity: medium
complianceType: musthave
subscription:
channel: stable-3.8
channel: stable-3.10
name: project-quay
namespace: operator-policy-testns
installPlanApproval: Automatic
source: operatorhubio-catalog
sourceNamespace: olm
startingCSV: quay-operator.v3.8.13
startingCSV: quay-operator.v3.10.0
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ spec:
severity: medium
complianceType: musthave
subscription:
channel: stable-3.8
channel: stable-3.10
name: project-quay
namespace: operator-policy-testns
installPlanApproval: Automatic
source: operatorhubio-catalog
sourceNamespace: olm
startingCSV: quay-operator.v3.8.1
startingCSV: quay-operator.v3.10.0
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ spec:
- operator-policy-testns
subscription:
actually: incorrect
channel: stable-3.8
channel: stable-3.10
name: project-quay
namespace: nonexist-testns
installPlanApproval: Incorrect
source: operatorhubio-catalog
sourceNamespace: olm
startingCSV: quay-operator.v3.8.1
startingCSV: quay-operator.v3.10.0
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ spec:
targetNamespaces:
- operator-policy-testns
subscription:
channel: stable-3.8
channel: stable-3.10
name: project-quay
namespace: operator-policy-testns
installPlanApproval: Automatic
source: operatorhubio-catalog
sourceNamespace: olm
startingCSV: quay-operator.v3.8.1
startingCSV: quay-operator.v3.10.0
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ spec:
installPlanApproval: Automatic
source: operatorhubio-catalog
sourceNamespace: olm
startingCSV: quay-operator.v3.8.1
startingCSV: quay-operator.v3.10.0
4 changes: 2 additions & 2 deletions test/resources/case38_operator_install/subscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ kind: Subscription
metadata:
name: project-quay
spec:
channel: stable-3.8
channel: stable-3.10
name: project-quay
installPlanApproval: Automatic
source: operatorhubio-catalog
sourceNamespace: olm
startingCSV: quay-operator.v3.8.1
startingCSV: quay-operator.v3.10.0

0 comments on commit 02e8326

Please sign in to comment.