overlay: test actual Opts

AsynchronousRemove opt was untested while it is specified by default in the plugin init.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2020-01-07 13:23:02 +09:00
parent b9fad5e310
commit a4b423b19b
2 changed files with 44 additions and 13 deletions

View File

@@ -38,8 +38,11 @@ import (
is "gotest.tools/assert/cmp"
)
// SnapshotterFunc is used in SnapshotterSuite
type SnapshotterFunc func(ctx context.Context, root string) (snapshots.Snapshotter, func() error, error)
// SnapshotterSuite runs a test suite on the snapshotter given a factory function.
func SnapshotterSuite(t *testing.T, name string, snapshotterFn func(ctx context.Context, root string) (snapshots.Snapshotter, func() error, error)) {
func SnapshotterSuite(t *testing.T, name string, snapshotterFn SnapshotterFunc) {
restoreMask := clearMask()
defer restoreMask()