|
@@ -19,7 +19,7 @@ func TestCopyFromContainerPathDoesNotExist(t *testing.T) {
|
|
|
|
|
|
ctx := context.Background()
|
|
ctx := context.Background()
|
|
apiclient := testEnv.APIClient()
|
|
apiclient := testEnv.APIClient()
|
|
- cid := container.Create(t, ctx, apiclient)
|
|
|
|
|
|
+ cid := container.Create(ctx, t, apiclient)
|
|
|
|
|
|
_, _, err := apiclient.CopyFromContainer(ctx, cid, "/dne")
|
|
_, _, err := apiclient.CopyFromContainer(ctx, cid, "/dne")
|
|
assert.Check(t, client.IsErrNotFound(err))
|
|
assert.Check(t, client.IsErrNotFound(err))
|
|
@@ -33,7 +33,7 @@ func TestCopyFromContainerPathIsNotDir(t *testing.T) {
|
|
|
|
|
|
ctx := context.Background()
|
|
ctx := context.Background()
|
|
apiclient := testEnv.APIClient()
|
|
apiclient := testEnv.APIClient()
|
|
- cid := container.Create(t, ctx, apiclient)
|
|
|
|
|
|
+ cid := container.Create(ctx, t, apiclient)
|
|
|
|
|
|
_, _, err := apiclient.CopyFromContainer(ctx, cid, "/etc/passwd/")
|
|
_, _, err := apiclient.CopyFromContainer(ctx, cid, "/etc/passwd/")
|
|
assert.Assert(t, is.ErrorContains(err, "not a directory"))
|
|
assert.Assert(t, is.ErrorContains(err, "not a directory"))
|
|
@@ -45,7 +45,7 @@ func TestCopyToContainerPathDoesNotExist(t *testing.T) {
|
|
|
|
|
|
ctx := context.Background()
|
|
ctx := context.Background()
|
|
apiclient := testEnv.APIClient()
|
|
apiclient := testEnv.APIClient()
|
|
- cid := container.Create(t, ctx, apiclient)
|
|
|
|
|
|
+ cid := container.Create(ctx, t, apiclient)
|
|
|
|
|
|
err := apiclient.CopyToContainer(ctx, cid, "/dne", nil, types.CopyToContainerOptions{})
|
|
err := apiclient.CopyToContainer(ctx, cid, "/dne", nil, types.CopyToContainerOptions{})
|
|
assert.Check(t, client.IsErrNotFound(err))
|
|
assert.Check(t, client.IsErrNotFound(err))
|
|
@@ -59,7 +59,7 @@ func TestCopyToContainerPathIsNotDir(t *testing.T) {
|
|
|
|
|
|
ctx := context.Background()
|
|
ctx := context.Background()
|
|
apiclient := testEnv.APIClient()
|
|
apiclient := testEnv.APIClient()
|
|
- cid := container.Create(t, ctx, apiclient)
|
|
|
|
|
|
+ cid := container.Create(ctx, t, apiclient)
|
|
|
|
|
|
err := apiclient.CopyToContainer(ctx, cid, "/etc/passwd/", nil, types.CopyToContainerOptions{})
|
|
err := apiclient.CopyToContainer(ctx, cid, "/etc/passwd/", nil, types.CopyToContainerOptions{})
|
|
assert.Assert(t, is.ErrorContains(err, "not a directory"))
|
|
assert.Assert(t, is.ErrorContains(err, "not a directory"))
|