فهرست منبع

Fix integration tests by adding DOCKER_TMPDIR env in the test init function

Signed-off-by: Tibor Vass <teabee89@gmail.com>
Tibor Vass 11 سال پیش
والد
کامیت
872db07119
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      integration/runtime_test.go

+ 2 - 0
integration/runtime_test.go

@@ -31,6 +31,7 @@ const (
 	unitTestImageIDShort     = "83599e29c455"
 	unitTestImageIDShort     = "83599e29c455"
 	unitTestNetworkBridge    = "testdockbr0"
 	unitTestNetworkBridge    = "testdockbr0"
 	unitTestStoreBase        = "/var/lib/docker/unit-tests"
 	unitTestStoreBase        = "/var/lib/docker/unit-tests"
+	unitTestDockerTmpdir     = "/var/lib/docker/tmp"
 	testDaemonAddr           = "127.0.0.1:4270"
 	testDaemonAddr           = "127.0.0.1:4270"
 	testDaemonProto          = "tcp"
 	testDaemonProto          = "tcp"
 	testDaemonHttpsProto     = "tcp"
 	testDaemonHttpsProto     = "tcp"
@@ -90,6 +91,7 @@ func init() {
 	// To test other drivers, we need a dedicated driver validation suite.
 	// To test other drivers, we need a dedicated driver validation suite.
 	os.Setenv("DOCKER_DRIVER", "vfs")
 	os.Setenv("DOCKER_DRIVER", "vfs")
 	os.Setenv("TEST", "1")
 	os.Setenv("TEST", "1")
+	os.Setenv("DOCKER_TMPDIR", unitTestDockerTmpdir)
 
 
 	// Hack to run sys init during unit testing
 	// Hack to run sys init during unit testing
 	if selfPath := utils.SelfPath(); strings.Contains(selfPath, ".dockerinit") {
 	if selfPath := utils.SelfPath(); strings.Contains(selfPath, ".dockerinit") {