@@ -52,6 +52,12 @@ func TestBuildKustomization(t *testing.T) {
5252 resultFile : "./testdata/build-kustomization/podinfo-result.yaml" ,
5353 assertFunc : "assertGoldenTemplateFile" ,
5454 },
55+ {
56+ name : "build podinfo with in-memory-build" ,
57+ args : "build kustomization podinfo --path ./testdata/build-kustomization/podinfo --in-memory-build" ,
58+ resultFile : "./testdata/build-kustomization/podinfo-result.yaml" ,
59+ assertFunc : "assertGoldenTemplateFile" ,
60+ },
5561 {
5662 name : "build podinfo without service" ,
5763 args : "build kustomization podinfo --path ./testdata/build-kustomization/delete-service" ,
@@ -70,12 +76,24 @@ func TestBuildKustomization(t *testing.T) {
7076 resultFile : "./testdata/build-kustomization/podinfo-with-ignore-result.yaml" ,
7177 assertFunc : "assertGoldenTemplateFile" ,
7278 },
79+ {
80+ name : "build ignore with in-memory-build" ,
81+ args : "build kustomization podinfo --path ./testdata/build-kustomization/ignore --ignore-paths \" !configmap.yaml,!secret.yaml\" --in-memory-build" ,
82+ resultFile : "./testdata/build-kustomization/podinfo-with-ignore-result.yaml" ,
83+ assertFunc : "assertGoldenTemplateFile" ,
84+ },
7385 {
7486 name : "build with recursive" ,
7587 args : "build kustomization podinfo --path ./testdata/build-kustomization/podinfo-with-my-app --recursive --local-sources GitRepository/default/podinfo=./testdata/build-kustomization" ,
7688 resultFile : "./testdata/build-kustomization/podinfo-with-my-app-result.yaml" ,
7789 assertFunc : "assertGoldenTemplateFile" ,
7890 },
91+ {
92+ name : "build with recursive and in-memory-build" ,
93+ args : "build kustomization podinfo --path ./testdata/build-kustomization/podinfo-with-my-app --recursive --local-sources GitRepository/default/podinfo=./testdata/build-kustomization --in-memory-build" ,
94+ resultFile : "./testdata/build-kustomization/podinfo-with-my-app-result.yaml" ,
95+ assertFunc : "assertGoldenTemplateFile" ,
96+ },
7997 }
8098
8199 tmpl := map [string ]string {
@@ -145,6 +163,12 @@ spec:
145163 resultFile : "./testdata/build-kustomization/podinfo-result.yaml" ,
146164 assertFunc : "assertGoldenTemplateFile" ,
147165 },
166+ {
167+ name : "build podinfo with in-memory-build" ,
168+ args : "build kustomization podinfo --kustomization-file " + tmpFile + " --path ./testdata/build-kustomization/podinfo --in-memory-build" ,
169+ resultFile : "./testdata/build-kustomization/podinfo-result.yaml" ,
170+ assertFunc : "assertGoldenTemplateFile" ,
171+ },
148172 {
149173 name : "build podinfo without service" ,
150174 args : "build kustomization podinfo --kustomization-file " + tmpFile + " --path ./testdata/build-kustomization/delete-service" ,
@@ -175,6 +199,18 @@ spec:
175199 resultFile : "./testdata/build-kustomization/podinfo-with-my-app-result.yaml" ,
176200 assertFunc : "assertGoldenTemplateFile" ,
177201 },
202+ {
203+ name : "build with recursive and in-memory-build" ,
204+ args : "build kustomization podinfo --kustomization-file " + tmpFile + " --path ./testdata/build-kustomization/podinfo-with-my-app --recursive --local-sources GitRepository/default/podinfo=./testdata/build-kustomization --in-memory-build" ,
205+ resultFile : "./testdata/build-kustomization/podinfo-with-my-app-result.yaml" ,
206+ assertFunc : "assertGoldenTemplateFile" ,
207+ },
208+ {
209+ name : "build with recursive and in-memory-build in dry-run mode" ,
210+ args : "build kustomization podinfo --kustomization-file " + tmpFile + " --path ./testdata/build-kustomization/podinfo-with-my-app --recursive --local-sources GitRepository/default/podinfo=./testdata/build-kustomization --in-memory-build --dry-run" ,
211+ resultFile : "./testdata/build-kustomization/podinfo-with-my-app-result.yaml" ,
212+ assertFunc : "assertGoldenTemplateFile" ,
213+ },
178214 }
179215
180216 tmpl := map [string ]string {
@@ -241,6 +277,12 @@ func TestBuildKustomizationPathNormalization(t *testing.T) {
241277 resultFile : "./testdata/build-kustomization/podinfo-result.yaml" ,
242278 assertFunc : "assertGoldenTemplateFile" ,
243279 },
280+ {
281+ name : "build with absolute path and in-memory-build" ,
282+ args : "build kustomization podinfo --path " + absTestDataPath + " --in-memory-build" ,
283+ resultFile : "./testdata/build-kustomization/podinfo-result.yaml" ,
284+ assertFunc : "assertGoldenTemplateFile" ,
285+ },
244286 {
245287 name : "build with complex relative path (parent dir)" ,
246288 args : "build kustomization podinfo --path ./testdata/build-kustomization/../build-kustomization/podinfo" ,
0 commit comments