Merge branch 'dm-fix-test-2' into dm

This commit is contained in:
Solomon Hykes 2013-10-15 22:42:49 +00:00
commit 66db2ac9d8
1 changed files with 5 additions and 4 deletions

View File

@ -167,15 +167,16 @@ func init() {
} }
// Always start from a clean set of loopback mounts // Always start from a clean set of loopback mounts
err := os.RemoveAll(unitTestStoreDevicesBase) if err := os.RemoveAll(unitTestStoreDevicesBase); err != nil {
if err != nil { log.Fatalf("Unable to remove former unit-test directory: %s", err)
panic(err)
} }
deviceset := devmapper.NewDeviceSetDM(unitTestStoreDevicesBase) deviceset := devmapper.NewDeviceSetDM(unitTestStoreDevicesBase)
// Create a device, which triggers the initiation of the base FS // Create a device, which triggers the initiation of the base FS
// This avoids other tests doing this and timing out // This avoids other tests doing this and timing out
deviceset.AddDevice("init", "") if err := deviceset.AddDevice("init", ""); err != nil {
log.Fatalf("Unable to create the base device: %s", err)
}
// Make it our Store root // Make it our Store root
if runtime, err := NewRuntimeFromDirectory(unitTestStoreBase, deviceset, false); err != nil { if runtime, err := NewRuntimeFromDirectory(unitTestStoreBase, deviceset, false); err != nil {