Merge pull request #17196 from liaoqingwei/16756-docker_cli_info_test

Use of checkers on docker_cli_info_test.go
This commit is contained in:
Brian Goff 2015-10-20 10:48:20 -04:00
Родитель 566964bf73 37b3cd421f
Коммит aa8abf637a
1 изменённых файлов: 3 добавлений и 7 удалений

Просмотреть файл

@ -2,7 +2,6 @@ package main
import (
"fmt"
"strings"
"github.com/docker/docker/pkg/integration/checker"
"github.com/docker/docker/utils"
@ -32,9 +31,7 @@ func (s *DockerSuite) TestInfoEnsureSucceeds(c *check.C) {
}
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, check.Commentf("couldn't find string %v in output", linePrefix))
}
}
@ -45,9 +42,8 @@ func (s *DockerSuite) TestInfoDiscoveryBackend(c *check.C) {
d := NewDaemon(c)
discoveryBackend := "consul://consuladdr:consulport/some/path"
if err := d.Start(fmt.Sprintf("--cluster-store=%s", discoveryBackend), "--cluster-advertise=foo"); err != nil {
c.Fatal(err)
}
err := d.Start(fmt.Sprintf("--cluster-store=%s", discoveryBackend), "--cluster-advertise=foo")
c.Assert(err, checker.IsNil)
defer d.Stop()
out, err := d.Cmd("info")