Browse Source

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

Solomon Hykes 12 years ago
parent
commit
ca6cd5b557
1 changed files with 2 additions and 11 deletions
  1. 2 11
      runtime_test.go

+ 2 - 11
runtime_test.go

@@ -12,11 +12,9 @@ import (
 	"time"
 )
 
-// FIXME: this is no longer needed
-const testLayerPath string = "/var/lib/docker/docker-ut.tar"
 const unitTestImageName string = "docker-ut"
 
-var unitTestStoreBase string
+const unitTestStoreBase string = "/var/lib/docker/unit-tests"
 
 func nuke(runtime *Runtime) error {
 	var wg sync.WaitGroup
@@ -62,15 +60,8 @@ func init() {
 		panic("docker tests needs to be run as root")
 	}
 
-	// Create a temp directory
-	root, err := ioutil.TempDir("", "docker-test")
-	if err != nil {
-		panic(err)
-	}
-	unitTestStoreBase = root
-
 	// Make it our Store root
-	runtime, err := NewRuntimeFromDirectory(root)
+	runtime, err := NewRuntimeFromDirectory(unitTestStoreBase)
 	if err != nil {
 		panic(err)
 	}