mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Merge pull request #50366 from dmcgowan/fix-integration-import-image-dep
Replace integration import test use of image type
This commit is contained in:
@@ -10,8 +10,8 @@ import (
|
||||
"testing"
|
||||
|
||||
cerrdefs "github.com/containerd/errdefs"
|
||||
"github.com/containerd/platforms"
|
||||
imagetypes "github.com/docker/docker/api/types/image"
|
||||
"github.com/docker/docker/image"
|
||||
"github.com/docker/docker/testutil"
|
||||
"github.com/docker/docker/testutil/daemon"
|
||||
"gotest.tools/v3/assert"
|
||||
@@ -71,32 +71,32 @@ func TestImportWithCustomPlatform(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
platform string
|
||||
expected image.V1Image
|
||||
expected platforms.Platform
|
||||
}{
|
||||
{
|
||||
platform: "",
|
||||
expected: image.V1Image{
|
||||
expected: platforms.Platform{
|
||||
OS: runtime.GOOS,
|
||||
Architecture: runtime.GOARCH, // this may fail on armhf due to normalization?
|
||||
},
|
||||
},
|
||||
{
|
||||
platform: runtime.GOOS,
|
||||
expected: image.V1Image{
|
||||
expected: platforms.Platform{
|
||||
OS: runtime.GOOS,
|
||||
Architecture: runtime.GOARCH, // this may fail on armhf due to normalization?
|
||||
},
|
||||
},
|
||||
{
|
||||
platform: strings.ToUpper(runtime.GOOS),
|
||||
expected: image.V1Image{
|
||||
expected: platforms.Platform{
|
||||
OS: runtime.GOOS,
|
||||
Architecture: runtime.GOARCH, // this may fail on armhf due to normalization?
|
||||
},
|
||||
},
|
||||
{
|
||||
platform: runtime.GOOS + "/sparc64",
|
||||
expected: image.V1Image{
|
||||
expected: platforms.Platform{
|
||||
OS: runtime.GOOS,
|
||||
Architecture: "sparc64",
|
||||
},
|
||||
@@ -141,7 +141,6 @@ func TestImportWithCustomPlatformReject(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
platform string
|
||||
expected image.V1Image
|
||||
expectedErr string
|
||||
}{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user