github.com/daaku/docker@v1.5.0/daemon/graphdriver/devmapper/devmapper_test.go (about)

     1  // +build linux
     2  
     3  package devmapper
     4  
     5  import (
     6  	"testing"
     7  
     8  	"github.com/docker/docker/daemon/graphdriver/graphtest"
     9  )
    10  
    11  func init() {
    12  	// Reduce the size the the base fs and loopback for the tests
    13  	DefaultDataLoopbackSize = 300 * 1024 * 1024
    14  	DefaultMetaDataLoopbackSize = 200 * 1024 * 1024
    15  	DefaultBaseFsSize = 300 * 1024 * 1024
    16  	if err := graphtest.InitLoopbacks(); err != nil {
    17  		panic(err)
    18  	}
    19  }
    20  
    21  // This avoids creating a new driver for each test if all tests are run
    22  // Make sure to put new tests between TestDevmapperSetup and TestDevmapperTeardown
    23  func TestDevmapperSetup(t *testing.T) {
    24  	graphtest.GetDriver(t, "devicemapper")
    25  }
    26  
    27  func TestDevmapperCreateEmpty(t *testing.T) {
    28  	graphtest.DriverTestCreateEmpty(t, "devicemapper")
    29  }
    30  
    31  func TestDevmapperCreateBase(t *testing.T) {
    32  	graphtest.DriverTestCreateBase(t, "devicemapper")
    33  }
    34  
    35  func TestDevmapperCreateSnap(t *testing.T) {
    36  	graphtest.DriverTestCreateSnap(t, "devicemapper")
    37  }
    38  
    39  func TestDevmapperTeardown(t *testing.T) {
    40  	graphtest.PutDriver(t)
    41  }