summaryrefslogtreecommitdiff
path: root/integration-cli/docker_cli_import_test.go
blob: 9b36aa9ce16a920bea7836d0b64ed388ac06c680 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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")
}