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

Function DaemonAPIVersion

internal/test/environment/testenv.go:113–121  ·  view source on GitHub ↗

DaemonAPIVersion returns the negotiated daemon API version.

(t *testing.T)

Source from the content-addressed store, hash-verified

111
112// DaemonAPIVersion returns the negotiated daemon API version.
113func DaemonAPIVersion(t *testing.T) string {
114 t.Helper()
115 // Use Client.APIVersion instead of Server.APIVersion.
116 // The latter is the maximum version that the server supports
117 // while the Client.APIVersion contains the negotiated version.
118 result := icmd.RunCmd(icmd.Command("docker", "version", "--format", "{{.Client.APIVersion}}"))
119 result.Assert(t, icmd.Expected{Err: icmd.None})
120 return strings.TrimSpace(result.Stdout())
121}

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…