зеркало из https://github.com/microsoft/docker.git
Checkers on integration-cli/docker_api_info_test
Applying #16756 to integration-cli/docker_api_info_test.go Signed-off-by: Aditi Rajagopal <arajagopal@us.ibm.com>
This commit is contained in:
Родитель
3ff9bb5332
Коммит
5cfa13ae48
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче