diff --git a/snapshot/overlayfs.go b/snapshot/overlayfs.go index e5358f8..e82b573 100644 --- a/snapshot/overlayfs.go +++ b/snapshot/overlayfs.go @@ -51,7 +51,7 @@ func (o *Overlayfs) Prepare(key string, parentName string) ([]containerd.Mount, return active.mounts(o.cache) } -func (o *Overlayfs) Commit(key string, name string) error { +func (o *Overlayfs) Commit(name, key string) error { active := o.getActive(key) return active.commit(name) } diff --git a/snapshot/overlayfs_test.go b/snapshot/overlayfs_test.go index ecbef33..ebc4aa4 100644 --- a/snapshot/overlayfs_test.go +++ b/snapshot/overlayfs_test.go @@ -67,7 +67,7 @@ func TestOverlayfsCommit(t *testing.T) { t.Error(err) return } - if err := o.Commit(key, "base"); err != nil { + if err := o.Commit("base", key); err != nil { t.Error(err) return } @@ -90,7 +90,7 @@ func TestOverlayfsOverlayMount(t *testing.T) { t.Error(err) return } - if err := o.Commit(key, "base"); err != nil { + if err := o.Commit("base", key); err != nil { t.Error(err) return } @@ -150,7 +150,7 @@ func TestOverlayfsOverlayRead(t *testing.T) { t.Error(err) return } - if err := o.Commit(key, "base"); err != nil { + if err := o.Commit("base", key); err != nil { t.Error(err) return }