mirror of https://github.com/docker/docs.git
Merge pull request #1049 from dotcloud/1040_ignore_stderr_tests-fix
- Tests: Ignore stderr while doing tests
This commit is contained in:
commit
ada0e1fb08
|
@ -1267,7 +1267,7 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, warning := range runResult.Warnings {
|
for _, warning := range runResult.Warnings {
|
||||||
fmt.Fprintln(cli.err, "WARNING: ", warning)
|
fmt.Fprintf(cli.err, "WARNING: %s\n", warning)
|
||||||
}
|
}
|
||||||
|
|
||||||
//start the container
|
//start the container
|
||||||
|
|
|
@ -132,11 +132,12 @@ func TestImages(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// TestRunHostname checks that 'docker run -h' correctly sets a custom hostname
|
// TestRunHostname checks that 'docker run -h' correctly sets a custom hostname
|
||||||
func TestRunHostname(t *testing.T) {
|
func TestRunHostname(t *testing.T) {
|
||||||
stdout, stdoutPipe := io.Pipe()
|
stdout, stdoutPipe := io.Pipe()
|
||||||
|
|
||||||
cli := NewDockerCli(nil, stdoutPipe, nil, testDaemonProto, testDaemonAddr)
|
cli := NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
||||||
defer cleanup(globalRuntime)
|
defer cleanup(globalRuntime)
|
||||||
|
|
||||||
c := make(chan struct{})
|
c := make(chan struct{})
|
||||||
|
@ -329,7 +330,7 @@ func TestRunAttachStdin(t *testing.T) {
|
||||||
stdin, stdinPipe := io.Pipe()
|
stdin, stdinPipe := io.Pipe()
|
||||||
stdout, stdoutPipe := io.Pipe()
|
stdout, stdoutPipe := io.Pipe()
|
||||||
|
|
||||||
cli := NewDockerCli(stdin, stdoutPipe, nil, testDaemonProto, testDaemonAddr)
|
cli := NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
||||||
defer cleanup(globalRuntime)
|
defer cleanup(globalRuntime)
|
||||||
|
|
||||||
ch := make(chan struct{})
|
ch := make(chan struct{})
|
||||||
|
|
Loading…
Reference in New Issue