From 5cfa13ae486ec2305ee31eaf89e3ec17dd84610b Mon Sep 17 00:00:00 2001 From: Aditi Rajagopal Date: Thu, 19 Nov 2015 02:15:38 +0100 Subject: [PATCH] Checkers on integration-cli/docker_api_info_test Applying #16756 to integration-cli/docker_api_info_test.go Signed-off-by: Aditi Rajagopal --- integration-cli/docker_api_info_test.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/integration-cli/docker_api_info_test.go b/integration-cli/docker_api_info_test.go index b10012494e..479bf5fa4f 100644 --- a/integration-cli/docker_api_info_test.go +++ b/integration-cli/docker_api_info_test.go @@ -2,8 +2,8 @@ package main import ( "net/http" - "strings" + "github.com/docker/docker/pkg/integration/checker" "github.com/go-check/check" ) @@ -11,8 +11,8 @@ func (s *DockerSuite) TestInfoApi(c *check.C) { endpoint := "/info" status, body, err := sockRequest("GET", endpoint, 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) // always shown fields stringsToCheck := []string{ @@ -32,8 +32,6 @@ func (s *DockerSuite) TestInfoApi(c *check.C) { out := string(body) for _, linePrefix := range stringsToCheck { - if !strings.Contains(out, linePrefix) { - c.Errorf("couldn't find string %v in output", linePrefix) - } + c.Assert(out, checker.Contains, linePrefix) } }