address a few nits

Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
This commit is contained in:
Tibor Vass 2014-07-25 18:29:47 -04:00
parent 7dde97640f
commit d082381a93
2 changed files with 2 additions and 4 deletions

View file

@ -12,8 +12,8 @@ func TestImportDisplay(t *testing.T) {
out, _, err := runCommandWithOutput(importCmd)
errorOut(err, t, fmt.Sprintf("import failed with errors: %v", err))
if n := len(strings.Split(out, "\n")); n != 3 {
t.Fatalf("display is messed up: %d '\\n' instead of 3", n)
if n := strings.Count(out, "\n"); n != 2 {
t.Fatalf("display is messed up: %d '\\n' instead of 2", n)
}
logDone("import - cirros was imported and display is fine")

View file

@ -1701,8 +1701,6 @@ func (srv *Server) ImageImport(job *engine.Job) engine.Status {
u.Path = ""
}
job.Stdout.Write(sf.FormatStatus("", "Downloading from %s", u))
// Download with curl (pretty progress bar)
// If curl is not available, fallback to http.Get()
resp, err = utils.Download(u.String())
if err != nil {
return job.Error(err)