1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Clean up integration-cli/docker_api_version_test.go

Signed-off-by: Kevin P. Kucharczyk <kevinkucharczyk@gmail.com>
This commit is contained in:
Kevin P. Kucharczyk 2015-10-15 19:15:24 +02:00
parent 9216b08536
commit 6f1b5946b1

View file

@ -6,20 +6,18 @@ import (
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/autogen/dockerversion" "github.com/docker/docker/autogen/dockerversion"
"github.com/docker/docker/pkg/integration/checker"
"github.com/go-check/check" "github.com/go-check/check"
) )
func (s *DockerSuite) TestGetVersion(c *check.C) { func (s *DockerSuite) TestGetVersion(c *check.C) {
status, body, err := sockRequest("GET", "/version", nil) status, body, err := sockRequest("GET", "/version", nil)
c.Assert(status, check.Equals, http.StatusOK) c.Assert(status, checker.Equals, http.StatusOK)
c.Assert(err, check.IsNil) c.Assert(err, checker.IsNil)
var v types.Version var v types.Version
if err := json.Unmarshal(body, &v); err != nil {
c.Fatal(err)
}
if v.Version != dockerversion.VERSION { c.Assert(json.Unmarshal(body, &v), checker.IsNil)
c.Fatal("Version mismatch")
} c.Assert(v.Version, checker.Equals, dockerversion.VERSION, check.Commentf("Version mismatch"))
} }