Sfoglia il codice sorgente

tests: Store the loopback images for test outside unit-tests

This directory is copied to each test prefix which is really
slow with the large loopback mounts.
Alexander Larsson 11 anni fa
parent
commit
a7fd1fce5d
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      runtime_test.go

+ 2 - 1
runtime_test.go

@@ -23,6 +23,7 @@ const (
 	unitTestImageID       = "83599e29c455eb719f77d799bc7c51521b9551972f5a850d7ad265bc1b5292f6" // 1.0
 	unitTestImageID       = "83599e29c455eb719f77d799bc7c51521b9551972f5a850d7ad265bc1b5292f6" // 1.0
 	unitTestNetworkBridge = "testdockbr0"
 	unitTestNetworkBridge = "testdockbr0"
 	unitTestStoreBase     = "/var/lib/docker/unit-tests"
 	unitTestStoreBase     = "/var/lib/docker/unit-tests"
+	unitTestStoreDevicesBase     = "/var/lib/docker/unit-tests-devices"
 	testDaemonAddr        = "127.0.0.1:4270"
 	testDaemonAddr        = "127.0.0.1:4270"
 	testDaemonProto       = "tcp"
 	testDaemonProto       = "tcp"
 )
 )
@@ -88,7 +89,7 @@ func init() {
 	NetworkBridgeIface = unitTestNetworkBridge
 	NetworkBridgeIface = unitTestNetworkBridge
 
 
 	// Make it our Store root
 	// Make it our Store root
-	if runtime, err := NewRuntimeFromDirectory(unitTestStoreBase, devmapper.NewDeviceSetDM(unitTestStoreBase), false); err != nil {
+	if runtime, err := NewRuntimeFromDirectory(unitTestStoreBase, devmapper.NewDeviceSetDM(unitTestStoreDevicesBase), false); err != nil {
 		panic(err)
 		panic(err)
 	} else {
 	} else {
 		globalRuntime = runtime
 		globalRuntime = runtime