|
@@ -9,6 +9,7 @@ import (
|
|
"sync"
|
|
"sync"
|
|
"time"
|
|
"time"
|
|
|
|
|
|
|
|
+ "github.com/docker/docker/pkg/integration/checker"
|
|
"github.com/go-check/check"
|
|
"github.com/go-check/check"
|
|
)
|
|
)
|
|
|
|
|
|
@@ -150,3 +151,12 @@ func (s *DockerSuite) TestAttachDisconnect(c *check.C) {
|
|
c.Assert(err, check.IsNil)
|
|
c.Assert(err, check.IsNil)
|
|
c.Assert(running, check.Equals, "true")
|
|
c.Assert(running, check.Equals, "true")
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+func (s *DockerSuite) TestAttachPausedContainer(c *check.C) {
|
|
|
|
+ defer unpauseAllContainers()
|
|
|
|
+ dockerCmd(c, "run", "-d", "--name=test", "busybox", "top")
|
|
|
|
+ dockerCmd(c, "pause", "test")
|
|
|
|
+ out, _, err := dockerCmdWithError("attach", "test")
|
|
|
|
+ c.Assert(err, checker.NotNil, check.Commentf(out))
|
|
|
|
+ c.Assert(out, checker.Contains, "You cannot attach to a paused container, unpause it first")
|
|
|
|
+}
|