diff --git a/pkg/app/piped/executor/kubernetes/kubernetes_test.go b/pkg/app/piped/executor/kubernetes/kubernetes_test.go index 039e19201d..d2406e2f4a 100644 --- a/pkg/app/piped/executor/kubernetes/kubernetes_test.go +++ b/pkg/app/piped/executor/kubernetes/kubernetes_test.go @@ -601,7 +601,7 @@ metadata: name: canary-by-config-change data: two: "2" - `, +`, expected: ` apiVersion: apps/v1 kind: Deployment @@ -645,7 +645,7 @@ metadata: name: canary-by-config-change data: two: "2" - `, +`, }, { name: "multiple configs", @@ -704,7 +704,7 @@ metadata: type: my-type data: "one": "Mg==" - `, +`, expected: ` apiVersion: apps/v1 kind: Deployment @@ -762,7 +762,7 @@ metadata: type: my-type data: "one": "Mg==" - `, +`, }, } diff --git a/pkg/app/piped/platformprovider/kubernetes/deployment_test.go b/pkg/app/piped/platformprovider/kubernetes/deployment_test.go index d96efa48e4..5c1b1c3e78 100644 --- a/pkg/app/piped/platformprovider/kubernetes/deployment_test.go +++ b/pkg/app/piped/platformprovider/kubernetes/deployment_test.go @@ -61,7 +61,7 @@ spec: - server ports: - containerPort: 9085 - `, +`, expected: nil, }, { @@ -100,7 +100,7 @@ spec: - name: config configMap: name: canary-by-config-change - `, +`, expected: []string{ "canary-by-config-change", }, @@ -164,7 +164,7 @@ spec: - name: config2 configMap: name: configmap-2 - `, +`, expected: []string{ "canary-by-config-change", "configmap-1", @@ -228,7 +228,7 @@ spec: - server ports: - containerPort: 9085 - `, +`, expected: nil, }, { @@ -267,7 +267,7 @@ spec: - name: config secret: secretName: canary-by-config-change - `, +`, expected: []string{ "canary-by-config-change", }, @@ -331,7 +331,7 @@ spec: - name: config2 secret: secretName: secret-2 - `, +`, expected: []string{ "canary-by-config-change", "init-secret-1", diff --git a/pkg/app/piped/platformprovider/kubernetes/hasher_test.go b/pkg/app/piped/platformprovider/kubernetes/hasher_test.go index 709d8c4c8f..19b486a05b 100644 --- a/pkg/app/piped/platformprovider/kubernetes/hasher_test.go +++ b/pkg/app/piped/platformprovider/kubernetes/hasher_test.go @@ -42,7 +42,7 @@ apiVersion: v1 kind: ConfigMap data: {} binaryData: {} - `, +`, expected: "42745tchd9", }, { @@ -53,7 +53,7 @@ kind: ConfigMap data: one: "" binaryData: {} - `, +`, expected: "9g67k2htb6", }, { @@ -66,7 +66,7 @@ data: one: "" three: "3" binaryData: {} - `, +`, expected: "f5h7t85m9b", }, { @@ -76,7 +76,7 @@ apiVersion: v1 kind: Secret type: my-type data: {} - `, +`, expected: "t75bgf6ctb", }, { @@ -87,7 +87,7 @@ kind: Secret type: my-type data: "one": "" - `, +`, expected: "74bd68bm66", }, { @@ -100,7 +100,7 @@ data: two: Mg== one: "" three: Mw== - `, +`, expected: "dgcb6h9tmk", }, { @@ -119,7 +119,7 @@ type: my-type data: one: "" three: Mw== - `, +`, expected: "57hhd7795k", }, { @@ -151,7 +151,7 @@ spec: - hello ports: - containerPort: 9085 - `, +`, expected: "db48kd6689", }, } diff --git a/pkg/yamlprocessor/yamlprocessor_test.go b/pkg/yamlprocessor/yamlprocessor_test.go index bd92c0fa92..8599da84cc 100644 --- a/pkg/yamlprocessor/yamlprocessor_test.go +++ b/pkg/yamlprocessor/yamlprocessor_test.go @@ -48,7 +48,7 @@ b: bv c: - 1 - 2 - `, +`, }, } for _, tc := range testcases { @@ -215,7 +215,7 @@ foo: new-text { name: "valid value with comment at the same line", yml: `foo: bar # comments - `, +`, path: "$.foo", value: "new-text", want: []byte("foo: new-text # comments\n"),