Merge pull request #34784 from dnephin/fix-client-not-found

Cleanup client not found errors
Upstream-commit: bb0e8ee51c8940c3ce23e4f594068612203c6139
Component: engine
This commit is contained in:
Vincent Demeester
2017-09-14 12:04:56 +02:00
committed by GitHub
31 changed files with 86 additions and 263 deletions
@@ -1617,7 +1617,7 @@ func (s *DockerSuite) TestContainerAPIDeleteWithEmptyName(c *check.C) {
defer cli.Close()
err = cli.ContainerRemove(context.Background(), "", types.ContainerRemoveOptions{})
c.Assert(err.Error(), checker.Contains, "Error response from daemon: page not found")
c.Assert(err.Error(), checker.Contains, "No such container")
}
func (s *DockerSuite) TestContainerAPIStatsWithNetworkDisabled(c *check.C) {
@@ -55,10 +55,8 @@ func (s *DockerSwarmSuite) TestAPISwarmConfigsDelete(c *check.C) {
c.Assert(err, checker.IsNil)
defer cli.Close()
expected := "no such config"
_, _, err = cli.ConfigInspectWithRaw(context.Background(), id)
c.Assert(err.Error(), checker.Contains, expected)
c.Assert(err.Error(), checker.Contains, "No such config")
}
func (s *DockerSwarmSuite) TestAPISwarmConfigsUpdate(c *check.C) {
@@ -64,14 +64,12 @@ func (s *DockerSwarmSuite) TestAPISwarmSecretsDelete(c *check.C) {
c.Assert(err, checker.IsNil)
defer cli.Close()
expected := "no such secret"
_, _, err = cli.SecretInspectWithRaw(context.Background(), id)
c.Assert(err.Error(), checker.Contains, expected)
c.Assert(err.Error(), checker.Contains, "No such secret")
id = "non-existing"
expected = "secret non-existing not found"
err = cli.SecretRemove(context.Background(), id)
c.Assert(err.Error(), checker.Contains, expected)
c.Assert(err.Error(), checker.Contains, "No such secret: non-existing")
}
func (s *DockerSwarmSuite) TestAPISwarmSecretsUpdate(c *check.C) {