Added line break to all WriteK, WriteF calls per PR feedback

This commit is contained in:
msk-
2021-01-21 10:03:18 +00:00
parent 7ac37867dc
commit eda827c317

View File

@@ -12,17 +12,20 @@ import (
func TestNamePrefixSuffixPatch(t *testing.T) { func TestNamePrefixSuffixPatch(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("bottom", `configMapGenerator: th.WriteK("bottom", `
configMapGenerator:
- name: bottom - name: bottom
literals: literals:
- KEY=value - KEY=value
`) `)
th.WriteK("left-service", `resources: th.WriteK("left-service", `
resources:
- deployment.yaml - deployment.yaml
`) `)
th.WriteF("left-service/deployment.yaml", `apiVersion: apps/v1 th.WriteF("left-service/deployment.yaml", `
apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: left-deploy name: left-deploy
@@ -42,11 +45,13 @@ spec:
name: service name: service
`) `)
th.WriteK("right-service", `resources: th.WriteK("right-service", `
resources:
- deployment.yaml - deployment.yaml
`) `)
th.WriteF("right-service/deployment.yaml", `apiVersion: apps/v1 th.WriteF("right-service/deployment.yaml", `
apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: right-deploy name: right-deploy
@@ -66,12 +71,14 @@ spec:
name: service name: service
`) `)
th.WriteK("top", `resources: th.WriteK("top", `
resources:
- ./left - ./left
- ./right - ./right
`) `)
th.WriteK("top/left", `resources: th.WriteK("top/left", `
resources:
- ../../left-service - ../../left-service
- ./bottom - ./bottom
@@ -97,13 +104,15 @@ patches:
key: KEY key: KEY
`) `)
th.WriteK("top/left/bottom", `namePrefix: left- th.WriteK("top/left/bottom", `
namePrefix: left-
resources: resources:
- ../../../bottom - ../../../bottom
`) `)
th.WriteK("top/right", `resources: th.WriteK("top/right", `
resources:
- ../../right-service - ../../right-service
- ./bottom - ./bottom
@@ -129,7 +138,8 @@ patches:
key: KEY key: KEY
`) `)
th.WriteK("top/right/bottom", `namePrefix: right- th.WriteK("top/right/bottom", `
namePrefix: right-
resources: resources:
- ../../../bottom - ../../../bottom