mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 00:52:55 +00:00
adds test for issue 2767
This commit is contained in:
@@ -637,6 +637,7 @@ spec:
|
|||||||
`)
|
`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// test for https://github.com/kubernetes-sigs/kustomize/issues/2767
|
||||||
const aDeploymentResource = `apiVersion: apps/v1
|
const aDeploymentResource = `apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
@@ -656,19 +657,12 @@ spec:
|
|||||||
protocol: TCP
|
protocol: TCP
|
||||||
`
|
`
|
||||||
|
|
||||||
|
// currently documents broken state. resulting ports: should have both
|
||||||
|
// take-over-the-world and disappearing-act on 8080
|
||||||
func TestPatchTransformerSimilarArrays(t *testing.T) {
|
func TestPatchTransformerSimilarArrays(t *testing.T) {
|
||||||
th := kusttest_test.MakeEnhancedHarness(t).
|
th := kusttest_test.MakeEnhancedHarness(t).
|
||||||
PrepBuiltin("PatchTransformer")
|
PrepBuiltin("PatchTransformer")
|
||||||
defer th.Reset()
|
defer th.Reset()
|
||||||
th.WriteF("patch.yaml", `
|
|
||||||
- op: add
|
|
||||||
path: /spec/rules/0/http/paths/-
|
|
||||||
value:
|
|
||||||
path: '/canada'
|
|
||||||
backend:
|
|
||||||
serviceName: hoser
|
|
||||||
servicePort: 7703
|
|
||||||
`)
|
|
||||||
|
|
||||||
th.RunTransformerAndCheckResult(`
|
th.RunTransformerAndCheckResult(`
|
||||||
apiVersion: builtin
|
apiVersion: builtin
|
||||||
|
|||||||
Reference in New Issue
Block a user