moby/cmd/docker/daemon_none_test.go
Daniel Nephin 8983d42988 Raise a more relevant error when dockerd is not available on the platform.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-02 11:59:25 -04:00

20 lines
369 B
Go

// +build !daemon
package main
import (
"strings"
"testing"
)
func TestCmdDaemon(t *testing.T) {
proxy := NewDaemonProxy()
err := proxy.CmdDaemon("--help")
if err == nil {
t.Fatal("Expected CmdDaemon to fail on Windows.")
}
if !strings.Contains(err.Error(), "Please run `dockerd`") {
t.Fatalf("Expected an error about running dockerd, got %s", err)
}
}