diff options
author | Sebastiaan van Stijn <thaJeztah@users.noreply.github.com> | 2023-05-04 19:48:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-04 19:48:40 +0200 |
commit | 8a4b095a94d57288ab5be58d2abdb7b84309b508 (patch) | |
tree | 291a31c23ff77922da31646630e962899c4d30f2 /integration | |
parent | 0e8eea5a70ffce61f391ec9e9bc8324e6e42ff49 (diff) | |
parent | 66cf0e3f5575cace57219607d042cc1c4cd536d2 (diff) | |
download | docker-8a4b095a94d57288ab5be58d2abdb7b84309b508.tar.gz |
Merge pull request #45353 from thaJeztah/api_container_change_type
api/types/container: create type for changes endpoint
Diffstat (limited to 'integration')
-rw-r--r-- | integration/container/diff_test.go | 13 | ||||
-rw-r--r-- | integration/plugin/graphdriver/external_test.go | 4 |
2 files changed, 8 insertions, 9 deletions
diff --git a/integration/container/diff_test.go b/integration/container/diff_test.go index 7df11ce605..c1e7ea6974 100644 --- a/integration/container/diff_test.go +++ b/integration/container/diff_test.go @@ -7,7 +7,6 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/integration/internal/container" - "github.com/docker/docker/pkg/archive" "gotest.tools/v3/assert" "gotest.tools/v3/poll" "gotest.tools/v3/skip" @@ -25,15 +24,15 @@ func TestDiff(t *testing.T) { // it will take a few seconds to exit. Also there's no way in Windows to // differentiate between an Add or a Modify, and all files are under // a "Files/" prefix. - expected := []containertypes.ContainerChangeResponseItem{ - {Kind: archive.ChangeAdd, Path: "/foo"}, - {Kind: archive.ChangeAdd, Path: "/foo/bar"}, + expected := []containertypes.FilesystemChange{ + {Kind: containertypes.ChangeAdd, Path: "/foo"}, + {Kind: containertypes.ChangeAdd, Path: "/foo/bar"}, } if testEnv.OSType == "windows" { poll.WaitOn(t, container.IsInState(ctx, client, cID, "exited"), poll.WithDelay(100*time.Millisecond), poll.WithTimeout(60*time.Second)) - expected = []containertypes.ContainerChangeResponseItem{ - {Kind: archive.ChangeModify, Path: "Files/foo"}, - {Kind: archive.ChangeModify, Path: "Files/foo/bar"}, + expected = []containertypes.FilesystemChange{ + {Kind: containertypes.ChangeModify, Path: "Files/foo"}, + {Kind: containertypes.ChangeModify, Path: "Files/foo/bar"}, } } diff --git a/integration/plugin/graphdriver/external_test.go b/integration/plugin/graphdriver/external_test.go index 8b14754467..5e9d9b851e 100644 --- a/integration/plugin/graphdriver/external_test.go +++ b/integration/plugin/graphdriver/external_test.go @@ -450,8 +450,8 @@ func testGraphDriver(ctx context.Context, t *testing.T, c client.APIClient, driv diffs, err := c.ContainerDiff(ctx, id) assert.NilError(t, err) - assert.Check(t, is.Contains(diffs, containertypes.ContainerChangeResponseItem{ - Kind: archive.ChangeAdd, + assert.Check(t, is.Contains(diffs, containertypes.FilesystemChange{ + Kind: containertypes.ChangeAdd, Path: "/hello", }), "diffs: %v", diffs) |