summaryrefslogtreecommitdiff
path: root/integration
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2022-03-18 16:33:43 +0100
committerSebastiaan van Stijn <github@gone.nl>2022-04-21 19:50:59 +0200
commit176f66df9ca5cdc9466661428f0a3ac33cd1ab1b (patch)
tree48fc4bbe7e15dffdaf540a1754aea570305eac0f /integration
parent54386f0c8f61796ff64f09b0e45b43c0a367c142 (diff)
downloaddocker-176f66df9ca5cdc9466661428f0a3ac33cd1ab1b.tar.gz
api/types: replace uses of deprecated types.Volume with volume.Volume
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'integration')
-rw-r--r--integration/system/disk_usage_test.go7
-rw-r--r--integration/volume/volume_test.go8
2 files changed, 8 insertions, 7 deletions
diff --git a/integration/system/disk_usage_test.go b/integration/system/disk_usage_test.go
index 6c40a9b2fd..a7bc863429 100644
--- a/integration/system/disk_usage_test.go
+++ b/integration/system/disk_usage_test.go
@@ -5,6 +5,7 @@ import (
"testing"
"github.com/docker/docker/api/types"
+ "github.com/docker/docker/api/types/volume"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/testutil/daemon"
"gotest.tools/v3/assert"
@@ -37,7 +38,7 @@ func TestDiskUsage(t *testing.T) {
assert.DeepEqual(t, du, types.DiskUsage{
Images: []*types.ImageSummary{},
Containers: []*types.Container{},
- Volumes: []*types.Volume{},
+ Volumes: []*volume.Volume{},
BuildCache: []*types.BuildCache{},
})
return du
@@ -64,7 +65,7 @@ func TestDiskUsage(t *testing.T) {
},
},
Containers: []*types.Container{},
- Volumes: []*types.Volume{},
+ Volumes: []*volume.Volume{},
BuildCache: []*types.BuildCache{},
})
return du
@@ -107,7 +108,7 @@ func TestDiskUsage(t *testing.T) {
Mounts: du.Containers[0].Mounts, // not relevant for the test
},
},
- Volumes: []*types.Volume{},
+ Volumes: []*volume.Volume{},
BuildCache: []*types.BuildCache{},
})
return du
diff --git a/integration/volume/volume_test.go b/integration/volume/volume_test.go
index 395c51e1f4..3063bc4acc 100644
--- a/integration/volume/volume_test.go
+++ b/integration/volume/volume_test.go
@@ -10,7 +10,7 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
- volumetypes "github.com/docker/docker/api/types/volume"
+ "github.com/docker/docker/api/types/volume"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/testutil/request"
"github.com/google/go-cmp/cmp/cmpopts"
@@ -28,12 +28,12 @@ func TestVolumesCreateAndList(t *testing.T) {
if testEnv.OSType == "windows" {
name = strings.ToLower(name)
}
- vol, err := client.VolumeCreate(ctx, volumetypes.VolumeCreateBody{
+ vol, err := client.VolumeCreate(ctx, volume.VolumeCreateBody{
Name: name,
})
assert.NilError(t, err)
- expected := types.Volume{
+ expected := volume.Volume{
// Ignore timestamp of CreatedAt
CreatedAt: vol.CreatedAt,
Driver: "local",
@@ -90,7 +90,7 @@ func TestVolumesInspect(t *testing.T) {
ctx := context.Background()
now := time.Now()
- vol, err := client.VolumeCreate(ctx, volumetypes.VolumeCreateBody{})
+ vol, err := client.VolumeCreate(ctx, volume.VolumeCreateBody{})
assert.NilError(t, err)
inspected, err := client.VolumeInspect(ctx, vol.Name)