Skip to content
This repository was archived by the owner on Jul 15, 2024. It is now read-only.

Commit b7e9f46

Browse files
committed
Output applicaiton structure is immutable
Signed-off-by: Vlad <[email protected]>
1 parent ad71f1d commit b7e9f46

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

pkg/utils/util_test.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ func TestRenderGoTemplateParams(t *testing.T) {
353353
},
354354
{
355355
name: "sprig functions are avilable",
356-
fieldVal: "{{upper .one}}{{default \"four\" .three}}",
356+
fieldVal: `{{upper .one}}{{default "four" .three}}`,
357357
expectedVal: "TWOfour",
358358
templateOptions: &argoprojiov1alpha1.ApplicationSetTemplateOptions{
359359
GotemplateEnabled: true,
@@ -362,6 +362,17 @@ func TestRenderGoTemplateParams(t *testing.T) {
362362
"one": "two",
363363
},
364364
},
365+
{
366+
name: "the output application structure is imutable",
367+
fieldVal: "{{ .yamlPiece }}\n\tsomeother: element",
368+
expectedVal: "targetRevision: my-other-branch\n\tsomeother: element",
369+
templateOptions: &argoprojiov1alpha1.ApplicationSetTemplateOptions{
370+
GotemplateEnabled: true,
371+
},
372+
params: map[string]string{
373+
"yamlPiece": "targetRevision: my-other-branch",
374+
},
375+
},
365376
}
366377

367378
for _, test := range tests {

0 commit comments

Comments
 (0)