mirror of https://github.com/docker/docs.git
remove integration/utils setRaw funcs
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
parent
7d738e0b8c
commit
63331abbca
|
@ -14,7 +14,6 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/libcontainer"
|
|
||||||
"github.com/docker/libcontainer/configs"
|
"github.com/docker/libcontainer/configs"
|
||||||
"github.com/docker/libcontainer/devices"
|
"github.com/docker/libcontainer/devices"
|
||||||
"github.com/docker/libcontainer/label"
|
"github.com/docker/libcontainer/label"
|
||||||
|
@ -1020,14 +1019,6 @@ func (container *Container) Exposes(p nat.Port) bool {
|
||||||
return exists
|
return exists
|
||||||
}
|
}
|
||||||
|
|
||||||
func (container *Container) GetPtyMaster() (libcontainer.Console, error) {
|
|
||||||
ttyConsole, ok := container.command.ProcessConfig.Terminal.(execdriver.TtyTerminal)
|
|
||||||
if !ok {
|
|
||||||
return nil, ErrNoTTY
|
|
||||||
}
|
|
||||||
return ttyConsole.Master(), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (container *Container) HostConfig() *runconfig.HostConfig {
|
func (container *Container) HostConfig() *runconfig.HostConfig {
|
||||||
container.Lock()
|
container.Lock()
|
||||||
res := container.hostConfig
|
res := container.hostConfig
|
||||||
|
|
|
@ -9,7 +9,6 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/docker/daemon"
|
"github.com/docker/docker/daemon"
|
||||||
"github.com/docker/docker/pkg/term"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func closeWrap(args ...io.Closer) error {
|
func closeWrap(args ...io.Closer) error {
|
||||||
|
@ -27,26 +26,6 @@ func closeWrap(args ...io.Closer) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func setRaw(t *testing.T, c *daemon.Container) *term.State {
|
|
||||||
pty, err := c.GetPtyMaster()
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
state, err := term.MakeRaw(pty.Fd())
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
return state
|
|
||||||
}
|
|
||||||
|
|
||||||
func unsetRaw(t *testing.T, c *daemon.Container, state *term.State) {
|
|
||||||
pty, err := c.GetPtyMaster()
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
term.RestoreTerminal(pty.Fd(), state)
|
|
||||||
}
|
|
||||||
|
|
||||||
func waitContainerStart(t *testing.T, timeout time.Duration) *daemon.Container {
|
func waitContainerStart(t *testing.T, timeout time.Duration) *daemon.Container {
|
||||||
var container *daemon.Container
|
var container *daemon.Container
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue