mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
test for '.' in replacement mapping value
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user