tests: Use testTmpDir var to specify tmp directory (#3459)

To be able to specify the directory where tests will be done.  This way,
it will be easier to run Minio tests on a mounted directory like NFS, ..
This commit is contained in:
Anis Elleuch
2016-12-16 07:25:05 +01:00
committed by Harshavardhana
parent 0db484c8f6
commit 8ceb969445
12 changed files with 43 additions and 45 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ func getUmask() int {
// Tests if the directory and file creations happen with proper umask.
func TestIsValidUmaskVol(t *testing.T) {
tmpPath, err := ioutil.TempDir(os.TempDir(), "minio-")
tmpPath, err := ioutil.TempDir(globalTestTmpDir, "minio-")
if err != nil {
t.Fatalf("Initializing temporary directory failed with %s.", err)
}
@@ -78,7 +78,7 @@ func TestIsValidUmaskVol(t *testing.T) {
// Tests if the file creations happen with proper umask.
func TestIsValidUmaskFile(t *testing.T) {
tmpPath, err := ioutil.TempDir(os.TempDir(), "minio-")
tmpPath, err := ioutil.TempDir(globalTestTmpDir, "minio-")
if err != nil {
t.Fatalf("Initializing temporary directory failed with %s.", err)
}