MCPcopy Create free account
hub / github.com/docker/cli / SkipIfNotExperimentalDaemon

Function SkipIfNotExperimentalDaemon

internal/test/environment/testenv.go:75–81  ·  view source on GitHub ↗

SkipIfNotExperimentalDaemon returns whether the test docker daemon is in experimental mode

(t *testing.T)

Source from the content-addressed store, hash-verified

73
74// SkipIfNotExperimentalDaemon returns whether the test docker daemon is in experimental mode
75func SkipIfNotExperimentalDaemon(t *testing.T) {
76 t.Helper()
77 result := icmd.RunCmd(icmd.Command("docker", "info", "--format", "{{.ExperimentalBuild}}"))
78 result.Assert(t, icmd.Expected{Err: icmd.None})
79 experimentalBuild := strings.TrimSpace(result.Stdout()) == "true"
80 skip.If(t, !experimentalBuild, "running against a non-experimental daemon")
81}
82
83// SkipIfDaemonNotLinux skips the test unless the running docker daemon is on Linux
84func SkipIfDaemonNotLinux(t *testing.T) {

Callers

nothing calls this directly

Calls 1

CommandMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…