Browse code

Keep a cache of the unit-tests image. So I can code in conferences with crappy wifi.

Solomon Hykes authored on 2013/04/18 03:32:13
Showing 1 changed files
... ...
@@ -12,11 +12,9 @@ import (
12 12
 	"time"
13 13
 )
14 14
 
15
-// FIXME: this is no longer needed
16
-const testLayerPath string = "/var/lib/docker/docker-ut.tar"
17 15
 const unitTestImageName string = "docker-ut"
18 16
 
19
-var unitTestStoreBase string
17
+const unitTestStoreBase string = "/var/lib/docker/unit-tests"
20 18
 
21 19
 func nuke(runtime *Runtime) error {
22 20
 	var wg sync.WaitGroup
... ...
@@ -62,15 +60,8 @@ func init() {
62 62
 		panic("docker tests needs to be run as root")
63 63
 	}
64 64
 
65
-	// Create a temp directory
66
-	root, err := ioutil.TempDir("", "docker-test")
67
-	if err != nil {
68
-		panic(err)
69
-	}
70
-	unitTestStoreBase = root
71
-
72 65
 	// Make it our Store root
73
-	runtime, err := NewRuntimeFromDirectory(root)
66
+	runtime, err := NewRuntimeFromDirectory(unitTestStoreBase)
74 67
 	if err != nil {
75 68
 		panic(err)
76 69
 	}