test for '.' in replacement mapping value

This commit is contained in:
Natasha Sarkar
2021-06-10 11:15:05 -07:00
parent 615984bf2d
commit cebda58437

View File

@@ -1338,6 +1338,27 @@ spec:
`,
expectedErr: "delimiter option can only be used with scalar nodes",
},
"mapping value contains '.' character": {
input: `apiVersion: v1
kind: Custom
metadata:
name: custom
annotations:
a.b.c/d-e: source
f.g.h/i-j: target
`,
replacements: `replacements:
- source:
name: custom
fieldPath: metadata.annotations.[a.b.c/d-e]
targets:
- select:
name: custom
fieldPaths:
- metadata.annotations.[f.g.h/i-j]
`,
expectedErr: "list path element must contain fieldName=fieldValue for element to match",
},
"list index contains '.' character": {
input: `apiVersion: v1
kind: ConfigMap