Unverified Commit 870e21d0 authored by Matthew Fisher's avatar Matthew Fisher Committed by GitHub
Browse files

Merge pull request #5607 from xichengliudui/update-go-const-park2

Using const() defines constants together (part:2)
Showing with 9 additions and 5 deletions
+9 -5
...@@ -26,7 +26,8 @@ import ( ...@@ -26,7 +26,8 @@ import (
rls "k8s.io/helm/pkg/proto/hapi/services" rls "k8s.io/helm/pkg/proto/hapi/services"
) )
const cmInputTemplate = `kind: ConfigMap const (
cmInputTemplate = `kind: ConfigMap
apiVersion: v1 apiVersion: v1
metadata: metadata:
name: example name: example
...@@ -34,7 +35,7 @@ data: ...@@ -34,7 +35,7 @@ data:
Release: Release:
{{.Release | toYaml | indent 4}} {{.Release | toYaml | indent 4}}
` `
const cmOutputTemplate = ` cmOutputTemplate = `
--- ---
# Source: installChart/templates/cm.yaml # Source: installChart/templates/cm.yaml
kind: ConfigMap kind: ConfigMap
...@@ -53,6 +54,7 @@ data: ...@@ -53,6 +54,7 @@ data:
seconds: 242085845 seconds: 242085845
` `
)
var installChart *chart.Chart var installChart *chart.Chart
......
...@@ -37,7 +37,8 @@ import ( ...@@ -37,7 +37,8 @@ import (
tillerEnv "k8s.io/helm/pkg/tiller/environment" tillerEnv "k8s.io/helm/pkg/tiller/environment"
) )
const manifestWithTestSuccessHook = ` const (
manifestWithTestSuccessHook = `
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
...@@ -51,7 +52,7 @@ spec: ...@@ -51,7 +52,7 @@ spec:
cmd: fake-command cmd: fake-command
` `
const manifestWithTestFailureHook = ` manifestWithTestFailureHook = `
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
...@@ -64,7 +65,7 @@ spec: ...@@ -64,7 +65,7 @@ spec:
image: fake-gold-finding-image image: fake-gold-finding-image
cmd: fake-gold-finding-command cmd: fake-gold-finding-command
` `
const manifestWithInstallHooks = `apiVersion: v1 manifestWithInstallHooks = `apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: test-cm name: test-cm
...@@ -73,6 +74,7 @@ metadata: ...@@ -73,6 +74,7 @@ metadata:
data: data:
name: value name: value
` `
)
func TestNewTestSuite(t *testing.T) { func TestNewTestSuite(t *testing.T) {
rel := releaseStub() rel := releaseStub()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment