1
0
mirror of https://github.com/moby/moby.git synced 2025-12-06 07:41:18 +03:00

Use suite for integration-cli

It prints test name and duration for each test.
Also performs deleteAllContainers after each test.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
Alexander Morozov
2015-04-18 09:46:47 -07:00
parent 6dcdf832a3
commit dc944ea7e4
60 changed files with 3746 additions and 4807 deletions

View File

@@ -3,15 +3,16 @@ package main
import (
"os/exec"
"strings"
"testing"
"github.com/go-check/check"
)
// ensure docker version works
func TestVersionEnsureSucceeds(t *testing.T) {
func (s *DockerSuite) TestVersionEnsureSucceeds(c *check.C) {
versionCmd := exec.Command(dockerBinary, "version")
out, _, err := runCommandWithOutput(versionCmd)
if err != nil {
t.Fatalf("failed to execute docker version: %s, %v", out, err)
c.Fatalf("failed to execute docker version: %s, %v", out, err)
}
stringsToCheck := []string{
@@ -29,9 +30,8 @@ func TestVersionEnsureSucceeds(t *testing.T) {
for _, linePrefix := range stringsToCheck {
if !strings.Contains(out, linePrefix) {
t.Errorf("couldn't find string %v in output", linePrefix)
c.Errorf("couldn't find string %v in output", linePrefix)
}
}
logDone("version - verify that it works and that the output is properly formatted")
}