remove the unused function and variable

Signed-off-by: Dong Gang <dong.gang@daocloud.io>
pull/7863/head
Dong Gang 6 years ago
parent cf53baac83
commit e5cfb07d28

@ -130,7 +130,6 @@ func TestTemplateCmd(t *testing.T) {
runTestCmd(t, tests)
}
func TestTemplateOutputDir(t *testing.T) {
is := assert.New(t)
@ -158,7 +157,6 @@ func TestTemplateOutputDir(t *testing.T) {
}
func TestInstallOutputDirWithReleaseName(t *testing.T) {
is := assert.New(t)
dir, err := ioutil.TempDir("", "output-dir")
@ -185,4 +183,3 @@ func TestInstallOutputDirWithReleaseName(t *testing.T) {
_, err = os.Stat(filepath.Join(newDir, "chart-for-template-output/templates/tests/test-connection.yaml"))
is.NoError(err)
}

@ -111,31 +111,6 @@ var manifestWithTestHook = `kind: Pod
cmd: fake-command
`
var rbacManifests = `apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: schedule-agents
rules:
- apiGroups: [""]
resources: ["pods", "pods/exec", "pods/log"]
verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: schedule-agents
namespace: {{ default .Release.Namespace}}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: schedule-agents
subjects:
- kind: ServiceAccount
name: schedule-agents
namespace: {{ .Release.Namespace }}
`
type chartOptions struct {
*chart.Chart
@ -244,15 +219,6 @@ func withSampleIncludingIncorrectTemplates() chartOption {
}
}
func withMultipleManifestTemplate() chartOption {
return func(opts *chartOptions) {
sampleTemplates := []*chart.File{
{Name: "templates/rbac", Data: []byte(rbacManifests)},
}
opts.Templates = append(opts.Templates, sampleTemplates...)
}
}
func withKube(version string) chartOption {
return func(opts *chartOptions) {
opts.Metadata.KubeVersion = version

Loading…
Cancel
Save