github.com/go/docker@v1.12.0-rc2/cmd/docker/daemon_none_test.go (about)

     1  // +build !daemon
     2  
     3  package main
     4  
     5  import (
     6  	"strings"
     7  	"testing"
     8  )
     9  
    10  func TestCmdDaemon(t *testing.T) {
    11  	proxy := NewDaemonProxy()
    12  	err := proxy.CmdDaemon("--help")
    13  	if err == nil {
    14  		t.Fatal("Expected CmdDaemon to fail on Windows.")
    15  	}
    16  
    17  	if !strings.Contains(err.Error(), "Please run `dockerd`") {
    18  		t.Fatalf("Expected an error about running dockerd, got %s", err)
    19  	}
    20  }