Move Mount into mount pkg
This moves both the Mount type and mountinfo into a single mount package. This also opens up the root of the repo to hold the containerd client implementation. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -9,8 +9,8 @@ import (
|
||||
"syscall"
|
||||
"testing"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/containerd/fs/fstest"
|
||||
"github.com/containerd/containerd/mount"
|
||||
"github.com/containerd/containerd/snapshot"
|
||||
"github.com/containerd/containerd/testutil"
|
||||
"github.com/stretchr/testify/assert"
|
||||
@@ -93,7 +93,7 @@ func checkSnapshotterBasic(ctx context.Context, t *testing.T, snapshotter snapsh
|
||||
t.Fatal("expected mounts to have entries")
|
||||
}
|
||||
|
||||
if err := containerd.MountAll(mounts, preparing); err != nil {
|
||||
if err := mount.MountAll(mounts, preparing); err != nil {
|
||||
t.Fatalf("failure reason: %+v", err)
|
||||
}
|
||||
defer testutil.Unmount(t, preparing)
|
||||
@@ -124,7 +124,7 @@ func checkSnapshotterBasic(ctx context.Context, t *testing.T, snapshotter snapsh
|
||||
if err != nil {
|
||||
t.Fatalf("failure reason: %+v", err)
|
||||
}
|
||||
if err := containerd.MountAll(mounts, next); err != nil {
|
||||
if err := mount.MountAll(mounts, next); err != nil {
|
||||
t.Fatalf("failure reason: %+v", err)
|
||||
}
|
||||
defer testutil.Unmount(t, next)
|
||||
@@ -179,7 +179,7 @@ func checkSnapshotterBasic(ctx context.Context, t *testing.T, snapshotter snapsh
|
||||
if err != nil {
|
||||
t.Fatalf("failure reason: %+v", err)
|
||||
}
|
||||
if err := containerd.MountAll(mounts, nextnext); err != nil {
|
||||
if err := mount.MountAll(mounts, nextnext); err != nil {
|
||||
t.Fatalf("failure reason: %+v", err)
|
||||
}
|
||||
defer testutil.Unmount(t, nextnext)
|
||||
@@ -211,7 +211,7 @@ func checkSnapshotterStatActive(ctx context.Context, t *testing.T, snapshotter s
|
||||
t.Fatal("expected mounts to have entries")
|
||||
}
|
||||
|
||||
if err = containerd.MountAll(mounts, preparing); err != nil {
|
||||
if err = mount.MountAll(mounts, preparing); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer testutil.Unmount(t, preparing)
|
||||
@@ -245,7 +245,7 @@ func checkSnapshotterStatCommitted(ctx context.Context, t *testing.T, snapshotte
|
||||
t.Fatal("expected mounts to have entries")
|
||||
}
|
||||
|
||||
if err = containerd.MountAll(mounts, preparing); err != nil {
|
||||
if err = mount.MountAll(mounts, preparing); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer testutil.Unmount(t, preparing)
|
||||
@@ -284,7 +284,7 @@ func snapshotterPrepareMount(ctx context.Context, snapshotter snapshot.Snapshott
|
||||
return "", fmt.Errorf("expected mounts to have entries")
|
||||
}
|
||||
|
||||
if err = containerd.MountAll(mounts, preparing); err != nil {
|
||||
if err = mount.MountAll(mounts, preparing); err != nil {
|
||||
return "", err
|
||||
}
|
||||
return preparing, nil
|
||||
|
||||
Reference in New Issue
Block a user