mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Merge pull request #51186 from thaJeztah/deprecate_api_v1.43
daemon: raise default minimum API version to v1.44
This commit is contained in:
@@ -138,7 +138,7 @@ func TestCgroupNamespacesRunOlderClient(t *testing.T) {
|
||||
|
||||
ctx := testutil.StartSpan(baseContext, t)
|
||||
|
||||
d := daemon.New(t, daemon.WithDefaultCgroupNamespaceMode("private"))
|
||||
d := daemon.New(t, daemon.WithEnvVars("DOCKER_MIN_API_VERSION=1.39"), daemon.WithDefaultCgroupNamespaceMode("private"))
|
||||
apiClient := d.NewClientT(t, client.WithVersion("1.39"))
|
||||
|
||||
d.StartWithBusybox(ctx, t)
|
||||
|
||||
@@ -9,9 +9,7 @@ import (
|
||||
|
||||
"github.com/google/go-cmp/cmp/cmpopts"
|
||||
"github.com/moby/moby/api/types/image"
|
||||
"github.com/moby/moby/api/types/versions"
|
||||
"github.com/moby/moby/client"
|
||||
"github.com/moby/moby/v2/daemon/config"
|
||||
"github.com/moby/moby/v2/integration/internal/container"
|
||||
iimage "github.com/moby/moby/v2/integration/internal/image"
|
||||
"github.com/moby/moby/v2/internal/testutil"
|
||||
@@ -255,7 +253,7 @@ func TestAPIImagesListManifests(t *testing.T) {
|
||||
|
||||
t.Run("unsupported before 1.47", func(t *testing.T) {
|
||||
// TODO: Remove when MinAPIVersion >= 1.47
|
||||
c := d.NewClientT(t, client.WithVersion(config.MinAPIVersion))
|
||||
c := d.NewClientT(t, client.WithVersion("1.46"))
|
||||
|
||||
images, err := c.ImageList(ctx, client.ImageListOptions{Manifests: true})
|
||||
assert.NilError(t, err)
|
||||
@@ -264,8 +262,6 @@ func TestAPIImagesListManifests(t *testing.T) {
|
||||
assert.Check(t, is.Nil(images[0].Manifests))
|
||||
})
|
||||
|
||||
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.47"))
|
||||
|
||||
api147 := d.NewClientT(t, client.WithVersion("1.47"))
|
||||
|
||||
t.Run("no manifests if not requested", func(t *testing.T) {
|
||||
|
||||
@@ -146,7 +146,7 @@ func TestInspectCfgdMAC(t *testing.T) {
|
||||
|
||||
ctx := setupTest(t)
|
||||
|
||||
d := daemon.New(t)
|
||||
d := daemon.New(t, daemon.WithEnvVars("DOCKER_MIN_API_VERSION=1.43"))
|
||||
d.StartWithBusybox(ctx, t)
|
||||
defer d.Stop(t)
|
||||
|
||||
@@ -241,7 +241,7 @@ func TestWatchtowerCreate(t *testing.T) {
|
||||
|
||||
ctx := setupTest(t)
|
||||
|
||||
d := daemon.New(t)
|
||||
d := daemon.New(t, daemon.WithEnvVars("DOCKER_MIN_API_VERSION=1.25"))
|
||||
d.StartWithBusybox(ctx, t)
|
||||
defer d.Stop(t)
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import (
|
||||
func TestDockerNetworkConnectAliasPreV144(t *testing.T) {
|
||||
ctx := setupTest(t)
|
||||
|
||||
d := swarm.NewSwarm(ctx, t, testEnv)
|
||||
d := swarm.NewSwarm(ctx, t, testEnv, daemon.WithEnvVars("DOCKER_MIN_API_VERSION=1.43"))
|
||||
defer d.Stop(t)
|
||||
apiClient := d.NewClientT(t, client.WithVersion("1.43"))
|
||||
defer apiClient.Close()
|
||||
|
||||
Reference in New Issue
Block a user