Testcases added for to test Stat() Interface.
Two test cases added - Prepare, Stat on new layer, should return Active layer. - Prepare & Commit , Stat on new layer, should return Committed layer Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
This commit is contained in:
parent
be20bb1eb8
commit
d9dd68ef5d
2 changed files with 91 additions and 0 deletions
|
@ -217,6 +217,8 @@ type Snapshotter interface {
|
|||
// SnapshotterSuite runs a test suite on the snapshotter given a factory function.
|
||||
func SnapshotterSuite(t *testing.T, name string, snapshotterFn func(root string) (Snapshotter, func(), error)) {
|
||||
t.Run("Basic", makeTest(t, name, snapshotterFn, checkSnapshotterBasic))
|
||||
t.Run("StatActive", makeTest(t, name, snapshotterFn, checkSnapshotterStatActive))
|
||||
t.Run("StatComitted", makeTest(t, name, snapshotterFn, checkSnapshotterStatCommitted))
|
||||
}
|
||||
|
||||
func makeTest(t *testing.T, name string, snapshotterFn func(root string) (Snapshotter, func(), error), fn func(t *testing.T, snapshotter Snapshotter, work string)) func(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue