Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( IsWindows = testRequirement{ func() bool { return runtime.GOOS == "windows" }, "Test requires a Windows daemon", } IsLinux = testRequirement{ func() bool { return runtime.GOOS == "linux" }, "Test requires a Linux daemon", } Network = testRequirement{ func() bool { // Set a timeout on the GET at 15s var timeout = 15 * time.Second var url = "https://hub.docker.com" client := http.Client{ Timeout: timeout, } resp, err := client.Get(url) if err != nil && strings.Contains(err.Error(), "use of closed network connection") { panic(fmt.Sprintf("Timeout for GET request on %s", url)) } if resp != nil { resp.Body.Close() } return err == nil }, "Test requires network availability, environment variable set to none to run in a non-network enabled mode.", } )
List test requirements
Functions ¶
func DaemonVersionIs ¶
func DaemonVersionIs(version string) testRequirement
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.