mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-14 10:30:59 +00:00
respond to PR feedback
This commit is contained in:
@@ -638,27 +638,8 @@ spec:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// test for https://github.com/kubernetes-sigs/kustomize/issues/2767
|
// test for https://github.com/kubernetes-sigs/kustomize/issues/2767
|
||||||
const aDeploymentResource = `apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: test-deployment
|
|
||||||
spec:
|
|
||||||
template:
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- image: test-image
|
|
||||||
name: test-deployment
|
|
||||||
ports:
|
|
||||||
- containerPort: 8080
|
|
||||||
name: take-over-the-world
|
|
||||||
protocol: TCP
|
|
||||||
- containerPort: 8080
|
|
||||||
name: disappearing-act
|
|
||||||
protocol: TCP
|
|
||||||
`
|
|
||||||
|
|
||||||
// currently documents broken state. resulting ports: should have both
|
// currently documents broken state. resulting ports: should have both
|
||||||
// take-over-the-world and disappearing-act on 8080
|
// 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")
|
||||||
@@ -679,7 +660,24 @@ patch: |-
|
|||||||
target:
|
target:
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
name: test-deployment
|
name: test-deployment
|
||||||
`, aDeploymentResource, `
|
`, `apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: test-deployment
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: test-image
|
||||||
|
name: test-deployment
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
name: take-over-the-world
|
||||||
|
protocol: TCP
|
||||||
|
- containerPort: 8080
|
||||||
|
name: disappearing-act
|
||||||
|
protocol: TCP
|
||||||
|
`, `
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
Reference in New Issue
Block a user