From d5fd75fe61d7c650ca7435c5158266e59abfdb1e Mon Sep 17 00:00:00 2001 From: Sushil Kumar Date: Fri, 5 May 2017 10:54:54 -0700 Subject: [PATCH] Updated StartLocalServerForTests to be private method --- pkg/repo/chartrepo_test.go | 8 ++++---- pkg/repo/index_test.go | 2 +- pkg/repo/local_test.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/repo/chartrepo_test.go b/pkg/repo/chartrepo_test.go index cae3c41db..f6d6df74e 100644 --- a/pkg/repo/chartrepo_test.go +++ b/pkg/repo/chartrepo_test.go @@ -190,8 +190,8 @@ func verifyIndex(t *testing.T, actual *IndexFile) { } } -// StartLocalServerForTests Start the local helm server -func StartLocalServerForTests(handler http.Handler) (*httptest.Server, error) { +// startLocalServerForTests Start the local helm server +func startLocalServerForTests(handler http.Handler) (*httptest.Server, error) { if handler == nil { fileBytes, err := ioutil.ReadFile("testdata/local-index.yaml") if err != nil { @@ -206,7 +206,7 @@ func StartLocalServerForTests(handler http.Handler) (*httptest.Server, error) { } func TestFindChartInRepoURL(t *testing.T) { - srv, err := StartLocalServerForTests(nil) + srv, err := startLocalServerForTests(nil) if err != nil { t.Fatal(err) } @@ -238,7 +238,7 @@ func TestErrorFindChartInRepoURL(t *testing.T) { t.Errorf("Expected error for bad chart URL, but got a different error (%v)", err) } - srv, err := StartLocalServerForTests(nil) + srv, err := startLocalServerForTests(nil) if err != nil { t.Fatal(err) } diff --git a/pkg/repo/index_test.go b/pkg/repo/index_test.go index 61ce5a434..17a1cc209 100644 --- a/pkg/repo/index_test.go +++ b/pkg/repo/index_test.go @@ -129,7 +129,7 @@ func TestMerge(t *testing.T) { } func TestDownloadIndexFile(t *testing.T) { - srv, err := StartLocalServerForTests(nil) + srv, err := startLocalServerForTests(nil) if err != nil { t.Fatal(err) } diff --git a/pkg/repo/local_test.go b/pkg/repo/local_test.go index 9d26244f4..1e5359dee 100644 --- a/pkg/repo/local_test.go +++ b/pkg/repo/local_test.go @@ -42,7 +42,7 @@ func TestRepositoryServer(t *testing.T) { } s := &RepositoryServer{RepoPath: "testdata/server"} - srv, err := StartLocalServerForTests(s) + srv, err := startLocalServerForTests(s) if err != nil { t.Fatal(err) }