|
@@ -12,6 +12,7 @@ import (
|
|
"path/filepath"
|
|
"path/filepath"
|
|
"reflect"
|
|
"reflect"
|
|
"regexp"
|
|
"regexp"
|
|
|
|
+ "runtime"
|
|
"sort"
|
|
"sort"
|
|
"strconv"
|
|
"strconv"
|
|
"strings"
|
|
"strings"
|
|
@@ -2642,7 +2643,10 @@ func (s *DockerSuite) TestRunTTYWithPipe(c *check.C) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
- expected := "cannot enable tty mode"
|
|
|
|
|
|
+ expected := "the input device is not a TTY"
|
|
|
|
+ if runtime.GOOS == "windows" {
|
|
|
|
+ expected += ". If you are using mintty, try prefixing the command with 'winpty'"
|
|
|
|
+ }
|
|
if out, _, err := runCommandWithOutput(cmd); err == nil {
|
|
if out, _, err := runCommandWithOutput(cmd); err == nil {
|
|
errChan <- fmt.Errorf("run should have failed")
|
|
errChan <- fmt.Errorf("run should have failed")
|
|
return
|
|
return
|
|
@@ -2655,7 +2659,7 @@ func (s *DockerSuite) TestRunTTYWithPipe(c *check.C) {
|
|
select {
|
|
select {
|
|
case err := <-errChan:
|
|
case err := <-errChan:
|
|
c.Assert(err, check.IsNil)
|
|
c.Assert(err, check.IsNil)
|
|
- case <-time.After(6 * time.Second):
|
|
|
|
|
|
+ case <-time.After(30 * time.Second):
|
|
c.Fatal("container is running but should have failed")
|
|
c.Fatal("container is running but should have failed")
|
|
}
|
|
}
|
|
}
|
|
}
|