@@ -78,13 +78,13 @@ tests:
7878 path : metadata.name
7979 value : region-one-gitops-policy
8080 equal :
81- path : spec.policy-templates[0].objectDefinition.spec.object-templates[2 ].objectDefinition.kind
81+ path : spec.policy-templates[0].objectDefinition.spec.object-templates[3 ].objectDefinition.kind
8282 value : Namespace
8383 - documentSelector :
8484 path : metadata.name
8585 value : region-one-gitops-policy
8686 equal :
87- path : spec.policy-templates[0].objectDefinition.spec.object-templates[2 ].objectDefinition.metadata.name
87+ path : spec.policy-templates[0].objectDefinition.spec.object-templates[3 ].objectDefinition.metadata.name
8888 value : yolo
8989
9090 - it : should create operatorgroup object-template when gitOpsSubNamespace is set to something other than openshift-operators
@@ -103,19 +103,19 @@ tests:
103103 path : metadata.name
104104 value : region-one-gitops-policy
105105 equal :
106- path : spec.policy-templates[0].objectDefinition.spec.object-templates[3 ].objectDefinition.kind
106+ path : spec.policy-templates[0].objectDefinition.spec.object-templates[4 ].objectDefinition.kind
107107 value : OperatorGroup
108108 - documentSelector :
109109 path : metadata.name
110110 value : region-one-gitops-policy
111111 equal :
112- path : spec.policy-templates[0].objectDefinition.spec.object-templates[3 ].objectDefinition.metadata.name
112+ path : spec.policy-templates[0].objectDefinition.spec.object-templates[4 ].objectDefinition.metadata.name
113113 value : my-gitops-ns-operator-group
114114 - documentSelector :
115115 path : metadata.name
116116 value : region-one-gitops-policy
117117 equal :
118- path : spec.policy-templates[0].objectDefinition.spec.object-templates[3 ].objectDefinition.metadata.namespace
118+ path : spec.policy-templates[0].objectDefinition.spec.object-templates[4 ].objectDefinition.metadata.namespace
119119 value : my-gitops-ns
120120
121121 - it : should not create operatorgroup nor namespace object-template when gitOpsSubNamespace is set to openshift-operators
@@ -135,7 +135,7 @@ tests:
135135 value : region-one-gitops-policy
136136 lengthEqual :
137137 path : spec.policy-templates[0].objectDefinition.spec.object-templates
138- count : 2 # Just subscription and configmap
138+ count : 3 # Subscription, namespace (vpArgoNamespace), and configmap
139139
140140 - it : should not create operatorgroup nor namespace object-template when gitOpsSubNamespace is set to null
141141 set :
@@ -154,7 +154,7 @@ tests:
154154 value : region-one-gitops-policy
155155 lengthEqual :
156156 path : spec.policy-templates[0].objectDefinition.spec.object-templates
157- count : 2 # Just subscription and configmap
157+ count : 3 # Subscription, namespace (vpArgoNamespace), and configmap
158158
159159 - it : should not create operatorgroup nor namespace object-template when gitOpsSubNamespace is set to empty
160160 set :
@@ -173,7 +173,7 @@ tests:
173173 value : region-one-gitops-policy
174174 lengthEqual :
175175 path : spec.policy-templates[0].objectDefinition.spec.object-templates
176- count : 2 # Just subscription and configmap
176+ count : 3 # Subscription, namespace (vpArgoNamespace), and configmap
177177
178178 - it : should use gitOpsSubNamespace as subscription namespace when set
179179 set :
@@ -191,5 +191,5 @@ tests:
191191 path : metadata.name
192192 value : region-one-gitops-policy
193193 matchRegex :
194- path : spec.policy-templates[0].objectDefinition.spec.object-templates[3 ].objectDefinition.metadata.namespace
194+ path : spec.policy-templates[0].objectDefinition.spec.object-templates[4 ].objectDefinition.metadata.namespace
195195 pattern : ^my-gitops-ns$
0 commit comments