From b430f4f45be27b9565027b5c89b2506577027e88 Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Mon, 31 Mar 2014 19:31:21 +0000 Subject: [PATCH] add test Docker-DCO-1.1-Signed-off-by: Victor Vieux (github: vieux) --- integration-cli/docker_cli_import_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 integration-cli/docker_cli_import_test.go diff --git a/integration-cli/docker_cli_import_test.go b/integration-cli/docker_cli_import_test.go new file mode 100644 index 0000000000..9b36aa9ce1 --- /dev/null +++ b/integration-cli/docker_cli_import_test.go @@ -0,0 +1,20 @@ +package main + +import ( + "fmt" + "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) + 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) + } + + logDone("import - cirros was imported and display is fine") +}