mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
dd7159060f
In more recent versions of Cobra, `--help` parsing is done before anything else resulting in TestDaemonCommand not actually passing. I'm actually unsure if this test ever passed since it appears that !daemon is not being run as part of the test suite. Signed-off-by: Aleksa Sarai <asarai@suse.de>
17 lines
278 B
Go
17 lines
278 B
Go
// +build !daemon
|
|
|
|
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/docker/docker/pkg/testutil/assert"
|
|
)
|
|
|
|
func TestDaemonCommand(t *testing.T) {
|
|
cmd := newDaemonCommand()
|
|
cmd.SetArgs([]string{"--version"})
|
|
err := cmd.Execute()
|
|
|
|
assert.Error(t, err, "Please run `dockerd`")
|
|
}
|