Skip to content

Commit

Permalink
adds test for issue 2767
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Kent committed Jul 25, 2020
1 parent 69d497c commit 729544b
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions plugin/builtin/patchtransformer/PatchTransformer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ spec:
`)
}

// test for https://github.com/kubernetes-sigs/kustomize/issues/2767
const aDeploymentResource = `apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -656,19 +657,12 @@ spec:
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) {
th := kusttest_test.MakeEnhancedHarness(t).
PrepBuiltin("PatchTransformer")
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(`
apiVersion: builtin
Expand Down

0 comments on commit 729544b

Please sign in to comment.