Skip to content

Commit 0502196

Browse files
committed
Add test for multi-line string
xref: fluxcd/flux2#3284 Signed-off-by: Stefan Prodan <[email protected]>
1 parent f88fe3d commit 0502196

File tree

2 files changed

+42
-8
lines changed

2 files changed

+42
-8
lines changed

pkg/update/testdata/setters/expected/kustomization.yaml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,25 @@
22
apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44
resources:
5-
- unimportant.yaml
5+
- unimportant.yaml
66
images:
7-
- name: container
8-
newName: index.repo.fake/updated # {"$imagepolicy": "automation-ns:policy:name"}
9-
newTag: v1.0.1 # {"$imagepolicy": "automation-ns:policy:tag"}
7+
- name: container
8+
newName: index.repo.fake/updated # {"$imagepolicy": "automation-ns:policy:name"}
9+
newTag: v1.0.1 # {"$imagepolicy": "automation-ns:policy:tag"}
10+
# Prove fix for https://github.com/fluxcd/flux2/issues/3284
11+
patches:
12+
- patch: |
13+
- op: replace
14+
path: /spec/template/spec/containers/0/volumeMounts
15+
value:
16+
- mountPath: /usr/share/wildfly/wildfly/standalone/configuration/appConfigMaps/WF
17+
name: wf-config
18+
- mountPath: /usr/share/wildfly/wildfly/standalone/configuration/appConfigMaps/xxx_config
19+
name: xxx-config
20+
- mountPath: /usr/share/wildfly/wildfly/standalone/log
21+
name: wildfly-standalone-log
22+
target:
23+
group: apps
24+
version: v1
25+
kind: Deployment
26+
name: sxxxxdadminservice

pkg/update/testdata/setters/original/kustomization.yaml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,25 @@
22
apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44
resources:
5-
- unimportant.yaml
5+
- unimportant.yaml
66
images:
7-
- name: container
8-
newName: replaced # {"$imagepolicy": "automation-ns:policy:name"}
9-
newTag: v1 # {"$imagepolicy": "automation-ns:policy:tag"}
7+
- name: container
8+
newName: replaced # {"$imagepolicy": "automation-ns:policy:name"}
9+
newTag: v1 # {"$imagepolicy": "automation-ns:policy:tag"}
10+
# Prove fix for https://github.com/fluxcd/flux2/issues/3284
11+
patches:
12+
- patch: |
13+
- op: replace
14+
path: /spec/template/spec/containers/0/volumeMounts
15+
value:
16+
- mountPath: /usr/share/wildfly/wildfly/standalone/configuration/appConfigMaps/WF
17+
name: wf-config
18+
- mountPath: /usr/share/wildfly/wildfly/standalone/configuration/appConfigMaps/xxx_config
19+
name: xxx-config
20+
- mountPath: /usr/share/wildfly/wildfly/standalone/log
21+
name: wildfly-standalone-log
22+
target:
23+
group: apps
24+
version: v1
25+
kind: Deployment
26+
name: sxxxxdadminservice

0 commit comments

Comments
 (0)