Improve error message when namespace transformer is given invalid fieldspecs

Also remove invalid+ignored fieldspecs from the defaults
This commit is contained in:
Katrina Verey
2022-07-27 19:56:24 -04:00
parent 26fcafdb57
commit 79a9154cf8
14 changed files with 148 additions and 41 deletions

View File

@@ -491,7 +491,9 @@ another`),
wantErr: `failed to parse rendered patch template into a resource:
001 aString
002 another
: wrong Node Kind for expected: MappingNode was ScalarNode: value: {aString another}`,
: wrong node kind: expected MappingNode but got ScalarNode: node contents:
aString another
`,
},
{
name: "ResourcePatchTemplate is invalid template",
@@ -515,7 +517,9 @@ another`),
wantErr: `failed to parse rendered patch template into a resource:
001 aString
002 another
: wrong Node Kind for expected: MappingNode was ScalarNode: value: {aString another}`,
: wrong node kind: expected MappingNode but got ScalarNode: node contents:
aString another
`,
},
{
name: "ContainerPatchTemplate is invalid template",
@@ -538,7 +542,9 @@ another`),
wantErr: `failed to parse rendered template into a resource:
001 aString
002 another
: wrong Node Kind for expected: MappingNode was ScalarNode: value: {aString another}`,
: wrong node kind: expected MappingNode but got ScalarNode: node contents:
aString another
`,
},
{
name: "ResourceTemplate is invalid template",