DaemonAPIVersion returns the negotiated daemon API version.
(t *testing.T)
| 111 | |
| 112 | // DaemonAPIVersion returns the negotiated daemon API version. |
| 113 | func 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 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…