2014-03-31 15:31:21 -04:00
|
|
|
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)
|
2014-09-12 09:51:21 -04:00
|
|
|
if err != nil {
|
|
|
|
t.Errorf("import failed with errors: %v, output: %q", err, out)
|
|
|
|
}
|
2014-03-31 15:31:21 -04:00
|
|
|
|
2014-07-25 18:29:47 -04:00
|
|
|
if n := strings.Count(out, "\n"); n != 2 {
|
|
|
|
t.Fatalf("display is messed up: %d '\\n' instead of 2", n)
|
2014-03-31 15:31:21 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
logDone("import - cirros was imported and display is fine")
|
|
|
|
}
|