Clean up integration-cli/docker_api_version_test.go

Signed-off-by: Kevin P. Kucharczyk <kevinkucharczyk@gmail.com>
Upstream-commit: 6f1b5946b13e617ab18c5325aac4859620045425
Component: engine
This commit is contained in:
Kevin P. Kucharczyk
2015-10-16 07:03:39 +02:00
parent 46bdc83696
commit 1c1b8094f5
@@ -6,20 +6,18 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/autogen/dockerversion"
"github.com/docker/docker/pkg/integration/checker"
"github.com/go-check/check"
)
func (s *DockerSuite) TestGetVersion(c *check.C) {
status, body, err := sockRequest("GET", "/version", nil)
c.Assert(status, check.Equals, http.StatusOK)
c.Assert(err, check.IsNil)
c.Assert(status, checker.Equals, http.StatusOK)
c.Assert(err, checker.IsNil)
var v types.Version
if err := json.Unmarshal(body, &v); err != nil {
c.Fatal(err)
}
if v.Version != dockerversion.VERSION {
c.Fatal("Version mismatch")
}
c.Assert(json.Unmarshal(body, &v), checker.IsNil)
c.Assert(v.Version, checker.Equals, dockerversion.VERSION, check.Commentf("Version mismatch"))
}