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
+5 -5
View File
@@ -2,23 +2,23 @@ package main
import (
"encoding/json"
"testing"
"github.com/docker/docker/api/types"
"github.com/docker/docker/autogen/dockerversion"
"github.com/go-check/check"
)
func TestGetVersion(t *testing.T) {
func (s *DockerSuite) TestGetVersion(c *check.C) {
_, body, err := sockRequest("GET", "/version", nil)
if err != nil {
t.Fatal(err)
c.Fatal(err)
}
var v types.Version
if err := json.Unmarshal(body, &v); err != nil {
t.Fatal(err)
c.Fatal(err)
}
if v.Version != dockerversion.VERSION {
t.Fatal("Version mismatch")
c.Fatal("Version mismatch")
}
}