Skip to content

Commit 260cb3d

Browse files
committed
Fix tests and add global.gitOpsSubNamespace to the exported values
1 parent a542592 commit 260cb3d

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

templates/_helpers.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ if this chart gets DeleteSpokeChildApps, it will set deletePattern to DeleteChil
6767
{{- else }}
6868
value: {{ $.Values.global.deletePattern }}
6969
{{- end }}
70+
- name: global.gitOpsSubNamespace
71+
value: {{ $.Values.global.gitOpsSubNamespace }}
7072
{{- end }} {{- /*acm.app.policies.helmparameters */}}
7173

7274
{{- define "acm.app.clusterSelector" -}}

tests/application_policy_test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ tests:
209209
value: group-one-clustergroup-policy
210210
lengthEqual:
211211
path: spec.policy-templates[0].objectDefinition.spec.object-templates[0].objectDefinition.spec.sources[1].helm.parameters
212-
count: 19 # 17 (in the helper) +2 (1 override, and 1 clusterGroup.name)
212+
count: 20 # 17 (in the helper) +3 (1 override, and 1 clusterGroup.name)
213213
- documentSelector:
214214
path: metadata.name
215215
value: group-one-clustergroup-policy
@@ -244,7 +244,7 @@ tests:
244244
value: group-one-clustergroup-policy
245245
lengthEqual:
246246
path: spec.policy-templates[0].objectDefinition.spec.object-templates[0].objectDefinition.spec.sources[1].helm.parameters
247-
count: 19 # 17 (in the helper) +2 (1 override, and 1 clusterGroup.name)
247+
count: 20 # 17 (in the helper) +3 (1 override, and 1 clusterGroup.name)
248248
- documentSelector:
249249
path: metadata.name
250250
value: group-one-clustergroup-policy

tests/gitops_sub_namespace_test.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,6 @@ tests:
117117
equal:
118118
path: spec.policy-templates[0].objectDefinition.spec.object-templates[1].objectDefinition.metadata.namespace
119119
value: my-gitops-ns
120-
- documentSelector:
121-
path: metadata.name
122-
value: region-one-gitops-policy
123-
equal:
124-
path: spec.policy-templates[0].objectDefinition.spec.object-templates[1].objectDefinition.spec.targetNamespaces[0]
125-
value: my-gitops-ns
126120

127121
- it: should use gitOpsSubNamespace as subscription namespace when set
128122
set:

0 commit comments

Comments
 (0)