Skip to content

Commit

Permalink
Using const() defines constants together (part:2)
Browse files Browse the repository at this point in the history
Signed-off-by: xichengliudui <[email protected]>

update pull request
Signed-off-by: xichengliudui <[email protected]>
  • Loading branch information
xichengliudui committed Apr 11, 2019
1 parent 8494d13 commit 165e071
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions pkg/helm/fake_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ import (
rls "k8s.io/helm/pkg/proto/hapi/services"
)

const cmInputTemplate = `kind: ConfigMap
const (
cmInputTemplate = `kind: ConfigMap
apiVersion: v1
metadata:
name: example
data:
Release:
{{.Release | toYaml | indent 4}}
`
const cmOutputTemplate = `
cmOutputTemplate = `
---
# Source: installChart/templates/cm.yaml
kind: ConfigMap
Expand All @@ -53,6 +54,7 @@ data:
seconds: 242085845
`
)

var installChart *chart.Chart

Expand Down
8 changes: 5 additions & 3 deletions pkg/releasetesting/test_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ import (
tillerEnv "k8s.io/helm/pkg/tiller/environment"
)

const manifestWithTestSuccessHook = `
const (
manifestWithTestSuccessHook = `
apiVersion: v1
kind: Pod
metadata:
Expand All @@ -51,7 +52,7 @@ spec:
cmd: fake-command
`

const manifestWithTestFailureHook = `
manifestWithTestFailureHook = `
apiVersion: v1
kind: Pod
metadata:
Expand All @@ -64,7 +65,7 @@ spec:
image: fake-gold-finding-image
cmd: fake-gold-finding-command
`
const manifestWithInstallHooks = `apiVersion: v1
manifestWithInstallHooks = `apiVersion: v1
kind: ConfigMap
metadata:
name: test-cm
Expand All @@ -73,6 +74,7 @@ metadata:
data:
name: value
`
)

func TestNewTestSuite(t *testing.T) {
rel := releaseStub()
Expand Down

0 comments on commit 165e071

Please sign in to comment.