add edit command option for editing name suffix

This commit is contained in:
zoncoen
2018-11-15 19:04:31 +09:00
parent 04a030bcf0
commit 3488b542ac
7 changed files with 162 additions and 1 deletions

View File

@@ -54,6 +54,7 @@ func determineFieldOrder() []string {
"Resources",
"Bases",
"NamePrefix",
"NameSuffix",
"Namespace",
"Crds",
"CommonLabels",

View File

@@ -33,6 +33,7 @@ func TestFieldOrder(t *testing.T) {
"Resources",
"Bases",
"NamePrefix",
"NameSuffix",
"Namespace",
"Crds",
"CommonLabels",
@@ -85,6 +86,7 @@ func TestWriteAndRead(t *testing.T) {
func TestDeprecationOfPatches(t *testing.T) {
hasDeprecatedFields := []byte(`
namePrefix: acme
nameSuffix: emca
patches:
- alice
patchesStrategicMerge:
@@ -103,6 +105,9 @@ patchesStrategicMerge:
if k.NamePrefix != "acme" {
t.Fatalf("Unexpected name prefix")
}
if k.NameSuffix != "emca" {
t.Fatalf("Unexpected name suffix")
}
if len(k.Patches) > 0 {
t.Fatalf("Expected nothing in Patches.")
}