diff --git a/api/server/router/system/system_routes.go b/api/server/router/system/system_routes.go index e58ef781b9eea..fa73169bac90b 100644 --- a/api/server/router/system/system_routes.go +++ b/api/server/router/system/system_routes.go @@ -81,7 +81,6 @@ func (s *systemRouter) getInfo(ctx context.Context, w http.ResponseWriter, r *ht nameOnly = append(nameOnly, so.Name) } info.SecurityOptions = nameOnly - info.ExecutionDriver = "" //nolint:staticcheck // ignore SA1019 (ExecutionDriver is deprecated) } if versions.LessThan(version, "1.39") { if info.KernelVersion == "" { diff --git a/api/types/system/info.go b/api/types/system/info.go index 6791cf3284c4d..c66a2afb8bbe3 100644 --- a/api/types/system/info.go +++ b/api/types/system/info.go @@ -77,9 +77,6 @@ type Info struct { Containerd *ContainerdInfo `json:",omitempty"` - // Legacy API fields for older API versions. - legacyFields - // Warnings contains a slice of warnings that occurred while collecting // system information. These warnings are intended to be informational // messages for the user, and are not intended to be parsed / used for @@ -124,10 +121,6 @@ type ContainerdNamespaces struct { Plugins string } -type legacyFields struct { - ExecutionDriver string `json:",omitempty"` // Deprecated: deprecated since API v1.25, but returned for older versions. -} - // PluginsInfo is a temp struct holding Plugins name // registered with docker daemon. It is used by [Info] struct type PluginsInfo struct { diff --git a/integration/system/info_linux_test.go b/integration/system/info_linux_test.go index a6d836091473e..f23699e35fe69 100644 --- a/integration/system/info_linux_test.go +++ b/integration/system/info_linux_test.go @@ -3,11 +3,8 @@ package system // import "github.com/docker/docker/integration/system" import ( - "net/http" "testing" - "github.com/docker/docker/testutil" - req "github.com/docker/docker/testutil/request" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" ) @@ -28,20 +25,3 @@ func TestInfoBinaryCommits(t *testing.T) { assert.Check(t, "N/A" != info.RuncCommit.ID) assert.Check(t, is.Equal(info.RuncCommit.Expected, info.RuncCommit.ID)) } - -func TestInfoAPIVersioned(t *testing.T) { - ctx := testutil.StartSpan(baseContext, t) - - res, body, err := req.Get(ctx, "/v1.24/info") - assert.NilError(t, err) - assert.Check(t, is.DeepEqual(res.StatusCode, http.StatusOK)) - - b, err := req.ReadBody(body) - assert.NilError(t, err) - - // Verify the old response on API 1.24 and older before commit - // 6d98e344c7702a8a713cb9e02a19d83a79d3f930. - out := string(b) - assert.Check(t, is.Contains(out, "ExecutionDriver")) - assert.Check(t, is.Contains(out, "not supported")) -}