From aaf1f73bcc2c594f07254a98ff77de3cc6351e92 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 4 Oct 2013 15:47:43 +0200 Subject: [PATCH] Tests: Initialize devicemapper early to avoid it happening in a test This can take a while and may cause some tests to timeout --- runtime_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/runtime_test.go b/runtime_test.go index 7c12832e30..07765e2d08 100644 --- a/runtime_test.go +++ b/runtime_test.go @@ -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