|
@@ -5,6 +5,7 @@ import (
|
|
|
"fmt"
|
|
|
"github.com/dotcloud/docker"
|
|
|
"github.com/dotcloud/docker/engine"
|
|
|
+ "github.com/dotcloud/docker/term"
|
|
|
"github.com/dotcloud/docker/utils"
|
|
|
"io"
|
|
|
"io/ioutil"
|
|
@@ -507,6 +508,17 @@ func TestAttachDetach(t *testing.T) {
|
|
|
<-ch
|
|
|
})
|
|
|
|
|
|
+ pty, err := container.GetPtyMaster()
|
|
|
+ if err != nil {
|
|
|
+ t.Fatal(err)
|
|
|
+ }
|
|
|
+
|
|
|
+ state, err := term.MakeRaw(pty.Fd())
|
|
|
+ if err != nil {
|
|
|
+ t.Fatal(err)
|
|
|
+ }
|
|
|
+ defer term.RestoreTerminal(pty.Fd(), state)
|
|
|
+
|
|
|
stdin, stdinPipe = io.Pipe()
|
|
|
stdout, stdoutPipe = io.Pipe()
|
|
|
cli = docker.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|