1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Tests: Initialize devicemapper early to avoid it happening in a test

This can take a while and may cause some tests to timeout
This commit is contained in:
Alexander Larsson 2013-10-04 15:47:43 +02:00
parent 9b65c7cf49
commit aaf1f73bcc

View file

@ -147,8 +147,13 @@ func init() {
panic(err)
}
deviceset := devmapper.NewDeviceSetDM(unitTestStoreDevicesBase)
// Create a device, which triggers the initiation of the base FS
// This avoids other tests doing this and timing out
deviceset.AddDevice("init","")
// Make it our Store root
if runtime, err := NewRuntimeFromDirectory(unitTestStoreBase, devmapper.NewDeviceSetDM(unitTestStoreDevicesBase), false); err != nil {
if runtime, err := NewRuntimeFromDirectory(unitTestStoreBase, deviceset, false); err != nil {
panic(err)
} else {
globalRuntime = runtime