mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
3ec564bfda
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
21 lines
544 B
Go
21 lines
544 B
Go
package main
|
|
|
|
import (
|
|
"os/exec"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestImportDisplay(t *testing.T) {
|
|
importCmd := exec.Command(dockerBinary, "import", "https://github.com/ewindisch/docker-cirros/raw/master/cirros-0.3.0-x86_64-lxc.tar.gz")
|
|
out, _, err := runCommandWithOutput(importCmd)
|
|
if err != nil {
|
|
t.Errorf("import failed with errors: %v, output: %q", err, out)
|
|
}
|
|
|
|
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")
|
|
}
|