mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
972a94b449
Addresses #14756 Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
42 lines
1 KiB
Go
42 lines
1 KiB
Go
// +build linux
|
|
|
|
package devmapper
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/docker/docker/daemon/graphdriver/graphtest"
|
|
)
|
|
|
|
func init() {
|
|
// Reduce the size the the base fs and loopback for the tests
|
|
defaultDataLoopbackSize = 300 * 1024 * 1024
|
|
defaultMetaDataLoopbackSize = 200 * 1024 * 1024
|
|
defaultBaseFsSize = 300 * 1024 * 1024
|
|
defaultUdevSyncOverride = true
|
|
if err := graphtest.InitLoopbacks(); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
|
|
// This avoids creating a new driver for each test if all tests are run
|
|
// Make sure to put new tests between TestDevmapperSetup and TestDevmapperTeardown
|
|
func TestDevmapperSetup(t *testing.T) {
|
|
graphtest.GetDriver(t, "devicemapper")
|
|
}
|
|
|
|
func TestDevmapperCreateEmpty(t *testing.T) {
|
|
graphtest.DriverTestCreateEmpty(t, "devicemapper")
|
|
}
|
|
|
|
func TestDevmapperCreateBase(t *testing.T) {
|
|
graphtest.DriverTestCreateBase(t, "devicemapper")
|
|
}
|
|
|
|
func TestDevmapperCreateSnap(t *testing.T) {
|
|
graphtest.DriverTestCreateSnap(t, "devicemapper")
|
|
}
|
|
|
|
func TestDevmapperTeardown(t *testing.T) {
|
|
graphtest.PutDriver(t)
|
|
}
|