mirror of
https://github.com/clearlinux/docker.git
synced 2026-08-19 12:16:30 +00: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:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user