Move testutils image load to integration internal

The image load is only used by integration tests but the specialimage
testutils package used by many different tests. The image load relies on
the client which creates a transitive client dependency from the daemon
packages.

Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
Derek McGowan
2025-07-16 16:15:27 -07:00
parent 7766b8a763
commit b54bde4376
8 changed files with 84 additions and 73 deletions

View File

@@ -10,6 +10,7 @@ import (
containertypes "github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/integration/internal/container"
iimage "github.com/docker/docker/integration/internal/image"
"github.com/docker/docker/internal/testutils/specialimage"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"gotest.tools/v3/assert"
@@ -115,7 +116,7 @@ func TestRemoveWithPlatform(t *testing.T) {
var imageIdx *ocispec.Index
var descs []ocispec.Descriptor
specialimage.Load(ctx, t, apiClient, func(dir string) (*ocispec.Index, error) {
iimage.Load(ctx, t, apiClient, func(dir string) (*ocispec.Index, error) {
idx, d, err := specialimage.MultiPlatform(dir, imgName, []ocispec.Platform{
platformHost,
{