|
@@ -3,12 +3,6 @@ package docker
|
|
|
import (
|
|
|
"bufio"
|
|
|
"fmt"
|
|
|
- "github.com/dotcloud/docker/api/client"
|
|
|
- "github.com/dotcloud/docker/daemon"
|
|
|
- "github.com/dotcloud/docker/engine"
|
|
|
- "github.com/dotcloud/docker/image"
|
|
|
- "github.com/dotcloud/docker/pkg/term"
|
|
|
- "github.com/dotcloud/docker/utils"
|
|
|
"io"
|
|
|
"io/ioutil"
|
|
|
"os"
|
|
@@ -19,6 +13,13 @@ import (
|
|
|
"syscall"
|
|
|
"testing"
|
|
|
"time"
|
|
|
+
|
|
|
+ "github.com/dotcloud/docker/api/client"
|
|
|
+ "github.com/dotcloud/docker/daemon"
|
|
|
+ "github.com/dotcloud/docker/engine"
|
|
|
+ "github.com/dotcloud/docker/image"
|
|
|
+ "github.com/dotcloud/docker/pkg/term"
|
|
|
+ "github.com/dotcloud/docker/utils"
|
|
|
)
|
|
|
|
|
|
func closeWrap(args ...io.Closer) error {
|
|
@@ -1163,27 +1164,3 @@ func TestCmdKill(t *testing.T) {
|
|
|
|
|
|
closeWrap(stdin, stdinPipe, stdout, stdoutPipe)
|
|
|
}
|
|
|
-
|
|
|
-func TestRunTTYCommitRun(t *testing.T) {
|
|
|
- cli := api.NewDockerCli(nil, ioutil.Discard, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
-
|
|
|
- defer cleanup(globalEngine, t)
|
|
|
-
|
|
|
- ch := make(chan struct{})
|
|
|
- go func() {
|
|
|
- defer close(ch)
|
|
|
- cli.CmdRun("-t", unitTestImageID, "/bin/ls")
|
|
|
- }()
|
|
|
-
|
|
|
- container := waitContainerStart(t, 10*time.Second)
|
|
|
- time.Sleep(500 * time.Millisecond)
|
|
|
- setTimeout(t, "Waiting for container timedout", 5*time.Second, func() {
|
|
|
- <-ch
|
|
|
- })
|
|
|
-
|
|
|
- cli.CmdCommit(container.ID, "ttytest")
|
|
|
-
|
|
|
- if err := cli.CmdRun("ttytest", "/bin/ls"); err != nil {
|
|
|
- t.Fatal(err)
|
|
|
- }
|
|
|
-}
|