Browse code

remove integration/utils setRaw funcs

Signed-off-by: Brian Goff <cpuguy83@gmail.com>

Brian Goff authored on 2015/04/15 04:17:17
Showing 2 changed files
... ...
@@ -14,7 +14,6 @@ import (
14 14
 	"syscall"
15 15
 	"time"
16 16
 
17
-	"github.com/docker/libcontainer"
18 17
 	"github.com/docker/libcontainer/configs"
19 18
 	"github.com/docker/libcontainer/devices"
20 19
 	"github.com/docker/libcontainer/label"
... ...
@@ -1020,14 +1019,6 @@ func (container *Container) Exposes(p nat.Port) bool {
1020 1020
 	return exists
1021 1021
 }
1022 1022
 
1023
-func (container *Container) GetPtyMaster() (libcontainer.Console, error) {
1024
-	ttyConsole, ok := container.command.ProcessConfig.Terminal.(execdriver.TtyTerminal)
1025
-	if !ok {
1026
-		return nil, ErrNoTTY
1027
-	}
1028
-	return ttyConsole.Master(), nil
1029
-}
1030
-
1031 1023
 func (container *Container) HostConfig() *runconfig.HostConfig {
1032 1024
 	container.Lock()
1033 1025
 	res := container.hostConfig
... ...
@@ -9,7 +9,6 @@ import (
9 9
 	"time"
10 10
 
11 11
 	"github.com/docker/docker/daemon"
12
-	"github.com/docker/docker/pkg/term"
13 12
 )
14 13
 
15 14
 func closeWrap(args ...io.Closer) error {
... ...
@@ -27,26 +26,6 @@ func closeWrap(args ...io.Closer) error {
27 27
 	return nil
28 28
 }
29 29
 
30
-func setRaw(t *testing.T, c *daemon.Container) *term.State {
31
-	pty, err := c.GetPtyMaster()
32
-	if err != nil {
33
-		t.Fatal(err)
34
-	}
35
-	state, err := term.MakeRaw(pty.Fd())
36
-	if err != nil {
37
-		t.Fatal(err)
38
-	}
39
-	return state
40
-}
41
-
42
-func unsetRaw(t *testing.T, c *daemon.Container, state *term.State) {
43
-	pty, err := c.GetPtyMaster()
44
-	if err != nil {
45
-		t.Fatal(err)
46
-	}
47
-	term.RestoreTerminal(pty.Fd(), state)
48
-}
49
-
50 30
 func waitContainerStart(t *testing.T, timeout time.Duration) *daemon.Container {
51 31
 	var container *daemon.Container
52 32