Cleanup client not found errors.
And fix remove calls to return a notFound error Signed-off-by: Daniel Nephin <dnephin@docker.com> Upstream-commit: 81bb9978ab5ac99e84a5bf62d0d469f0aec1d506 Component: engine
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user