enable preserving order with generatorOptions

This commit is contained in:
Jingfang Liu
2018-10-22 10:45:49 -07:00
parent a8e393496f
commit 9ef96e9bb2
2 changed files with 17 additions and 9 deletions

View File

@@ -40,7 +40,7 @@ func TestFieldOrder(t *testing.T) {
"PatchesJson6902",
"ConfigMapGenerator",
"SecretGenerator",
// "GeneratorOptions",
"GeneratorOptions",
"Vars",
"ImageTags",
}
@@ -219,6 +219,9 @@ BASES:
patchesStrategicMerge:
- service.yaml
- pod.yaml
# generator options
generatorOptions:
disableHash: true
`)
expected := []byte(`
@@ -254,6 +257,9 @@ bases:
patchesStrategicMerge:
- service.yaml
- pod.yaml
# generator options
generatorOptions:
disableHash: true
`)
fSys := fs.MakeFakeFS()
fSys.WriteTestKustomizationWith(kustomizationContentWithComments)