mirror of
https://github.com/docker/cli.git
synced 2026-01-19 21:41:31 +03:00
Merge pull request #258 from adshmh/fix-daemon-unit-tests-output-leak
fixed output leak from daemon unit tests
Upstream-commit: e4e08baeba
Component: cli
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"testing"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
@@ -17,6 +18,7 @@ func TestDaemonCommandHelp(t *testing.T) {
|
||||
cmd := newDaemonCommand()
|
||||
cmd.RunE = stubRun
|
||||
cmd.SetArgs([]string{"--help"})
|
||||
cmd.SetOutput(ioutil.Discard)
|
||||
err := cmd.Execute()
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
@@ -25,6 +27,7 @@ func TestDaemonCommand(t *testing.T) {
|
||||
cmd := newDaemonCommand()
|
||||
cmd.RunE = stubRun
|
||||
cmd.SetArgs([]string{"--containerd", "/foo"})
|
||||
cmd.SetOutput(ioutil.Discard)
|
||||
err := cmd.Execute()
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user