1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/cmd/docker/daemon_unit_test.go
Daniel Nephin a594cd8991 Fix daemon command proxy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-26 12:19:02 -04:00

30 lines
556 B
Go

// +build daemon
package main
import (
"testing"
"github.com/docker/docker/pkg/testutil/assert"
"github.com/spf13/cobra"
)
func stubRun(cmd *cobra.Command, args []string) error {
return nil
}
func TestDaemonCommandHelp(t *testing.T) {
cmd := newDaemonCommand()
cmd.RunE = stubRun
cmd.SetArgs([]string{"--help"})
err := cmd.Execute()
assert.NilError(t, err)
}
func TestDaemonCommand(t *testing.T) {
cmd := newDaemonCommand()
cmd.RunE = stubRun
cmd.SetArgs([]string{"--containerd", "/foo"})
err := cmd.Execute()
assert.NilError(t, err)
}