mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Merge pull request #51316 from austinvazquez/refactor-client-container-export
client: refactor `ContainerExport` to wrap options/result structs
This commit is contained in:
@@ -27,7 +27,7 @@ func TestExportContainerAndImportImage(t *testing.T) {
|
||||
poll.WaitOn(t, container.IsStopped(ctx, apiClient, cID))
|
||||
|
||||
reference := "repo/" + strings.ToLower(t.Name()) + ":v1"
|
||||
exportRes, err := apiClient.ContainerExport(ctx, cID)
|
||||
exportRes, err := apiClient.ContainerExport(ctx, cID, client.ContainerExportOptions{})
|
||||
assert.NilError(t, err)
|
||||
importRes, err := apiClient.ImageImport(ctx, client.ImageImportSource{
|
||||
Source: exportRes,
|
||||
@@ -70,6 +70,6 @@ func TestExportContainerAfterDaemonRestart(t *testing.T) {
|
||||
|
||||
d.Restart(t)
|
||||
|
||||
_, err := c.ContainerExport(ctx, ctrID)
|
||||
_, err := c.ContainerExport(ctx, ctrID, client.ContainerExportOptions{})
|
||||
assert.NilError(t, err)
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ func TestNoOverlayfsWarningsAboutUndefinedBehaviors(t *testing.T) {
|
||||
return err
|
||||
}},
|
||||
{name: "export", operation: func(*testing.T) error {
|
||||
rc, err := apiClient.ContainerExport(ctx, cID)
|
||||
rc, err := apiClient.ContainerExport(ctx, cID, client.ContainerExportOptions{})
|
||||
if err == nil {
|
||||
defer rc.Close()
|
||||
_, err = io.Copy(io.Discard, rc)
|
||||
|
||||
@@ -362,7 +362,7 @@ func TestAuthZPluginEnsureLoadImportWorking(t *testing.T) {
|
||||
|
||||
cID := container.Run(ctx, t, c)
|
||||
|
||||
responseReader, err := c.ContainerExport(ctx, cID)
|
||||
responseReader, err := c.ContainerExport(ctx, cID, client.ContainerExportOptions{})
|
||||
assert.NilError(t, err)
|
||||
defer responseReader.Close()
|
||||
file, err := os.Create(exportedImagePath)
|
||||
|
||||
Reference in New Issue
Block a user