mirror of
https://github.com/helm/helm.git
synced 2026-02-21 17:04:52 -05:00
Updated StartLocalServerForTests to be private method
This commit is contained in:
parent
dce9d88c25
commit
d5fd75fe61
3 changed files with 6 additions and 6 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue