Merge pull request #1541 from adamreese/fix/lint-errors

fix(*): fix new linter errors
pull/1536/head
Adam Reese 8 years ago committed by GitHub
commit 8120508c1b

@ -49,6 +49,9 @@ func TestDependencyUpdateCmd(t *testing.T) {
srv := repotest.NewServer(hh) srv := repotest.NewServer(hh)
defer srv.Stop() defer srv.Stop()
copied, err := srv.CopyCharts("testdata/testcharts/*.tgz") copied, err := srv.CopyCharts("testdata/testcharts/*.tgz")
if err != nil {
t.Fatal(err)
}
t.Logf("Copied charts:\n%s", strings.Join(copied, "\n")) t.Logf("Copied charts:\n%s", strings.Join(copied, "\n"))
t.Logf("Listening on directory %s", srv.Root()) t.Logf("Listening on directory %s", srv.Root())

@ -32,6 +32,9 @@ func TestRepoRemove(t *testing.T) {
b := bytes.NewBuffer(nil) b := bytes.NewBuffer(nil)
home, err := tempHelmHome(t) home, err := tempHelmHome(t)
if err != nil {
t.Fatal(err)
}
defer os.Remove(home) defer os.Remove(home)
hh := helmpath.Home(home) hh := helmpath.Home(home)

@ -72,7 +72,7 @@ func Expand(dir string, r io.Reader) error {
return nil return nil
} }
// ExpandFile expands the src file into the dest directroy. // ExpandFile expands the src file into the dest directory.
func ExpandFile(dest, src string) error { func ExpandFile(dest, src string) error {
h, err := os.Open(src) h, err := os.Open(src)
if err != nil { if err != nil {

@ -110,6 +110,9 @@ func getAvailablePort() (int, error) {
defer l.Close() defer l.Close()
_, p, err := net.SplitHostPort(l.Addr().String()) _, p, err := net.SplitHostPort(l.Addr().String())
if err != nil {
return 0, err
}
port, err := strconv.Atoi(p) port, err := strconv.Atoi(p)
if err != nil { if err != nil {
return 0, err return 0, err

@ -138,6 +138,9 @@ func validateNoMissingValues(templatesPath string, chartValues chartutil.Values,
tmpl := template.New("tpl").Funcs(engine.FuncMap()) tmpl := template.New("tpl").Funcs(engine.FuncMap())
// If the templatesPath includes any *.tpl files we will parse and import them as associated templates // If the templatesPath includes any *.tpl files we will parse and import them as associated templates
associatedTemplates, err := filepath.Glob(filepath.Join(templatesPath, "*.tpl")) associatedTemplates, err := filepath.Glob(filepath.Join(templatesPath, "*.tpl"))
if err != nil {
return err
}
if len(associatedTemplates) > 0 { if len(associatedTemplates) > 0 {
tmpl, err = tmpl.ParseFiles(associatedTemplates...) tmpl, err = tmpl.ParseFiles(associatedTemplates...)

@ -75,7 +75,7 @@ func NewServer(docroot string) *Server {
return srv return srv
} }
// Server is an implementaiton of a repository server for testing. // Server is an implementation of a repository server for testing.
type Server struct { type Server struct {
docroot string docroot string
srv *httptest.Server srv *httptest.Server

Loading…
Cancel
Save