1
0
mirror of https://github.com/moby/moby.git synced 2025-07-30 18:23:29 +03:00

Refactor cleanup of paused test containers

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff
2016-12-20 16:26:55 -05:00
parent d477a24ec5
commit 788c20668d
3 changed files with 11 additions and 25 deletions

View File

@ -354,7 +354,7 @@ func (s *DockerSuite) TestContainerAPIPause(c *check.C) {
c.Assert(err, checker.IsNil)
c.Assert(status, checker.Equals, http.StatusNoContent)
pausedContainers, err := getSliceOfPausedContainers()
pausedContainers, err := getPausedContainers()
c.Assert(err, checker.IsNil, check.Commentf("error thrown while checking if containers were paused"))
if len(pausedContainers) != 1 || stringid.TruncateID(ContainerID) != pausedContainers[0] {
@ -365,9 +365,9 @@ func (s *DockerSuite) TestContainerAPIPause(c *check.C) {
c.Assert(err, checker.IsNil)
c.Assert(status, checker.Equals, http.StatusNoContent)
pausedContainers, err = getSliceOfPausedContainers()
pausedContainers, err = getPausedContainers()
c.Assert(err, checker.IsNil, check.Commentf("error thrown while checking if containers were paused"))
c.Assert(pausedContainers, checker.IsNil, check.Commentf("There should be no paused container."))
c.Assert(pausedContainers, checker.HasLen, 0, check.Commentf("There should be no paused container."))
}
func (s *DockerSuite) TestContainerAPITop(c *check.C) {