snapshot/btrfs: update btrfs to snappshotter
Updates the btrfs snapshotter to meet the interface and current tests. Mostly, we merge the keyspace into a common index. Like with the overlay driver, we will still need to do more verification work to ensure idempotence of key collisions. Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
e6c1bb0ff2
commit
9c4b235954
2 changed files with 177 additions and 102 deletions
|
@ -20,14 +20,14 @@ const (
|
|||
|
||||
func TestBtrfs(t *testing.T) {
|
||||
testutil.RequiresRoot(t)
|
||||
snapshot.DriverSuite(t, "Btrfs", func(root string) (snapshot.Driver, func(), error) {
|
||||
snapshot.SnapshotterSuite(t, "Btrfs", func(root string) (snapshot.Snapshotter, func(), error) {
|
||||
device := setupBtrfsLoopbackDevice(t, root)
|
||||
driver, err := NewDriver(device.deviceName, root)
|
||||
snapshotter, err := NewSnapshotter(device.deviceName, root)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
return driver, func() {
|
||||
return snapshotter, func() {
|
||||
device.remove(t)
|
||||
}, nil
|
||||
})
|
||||
|
@ -53,7 +53,7 @@ func TestBtrfsMounts(t *testing.T) {
|
|||
defer os.RemoveAll(root)
|
||||
|
||||
target := filepath.Join(root, "test")
|
||||
b, err := NewDriver(device.deviceName, root)
|
||||
b, err := NewSnapshotter(device.deviceName, root)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue