mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -05:00
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:
committed by
Harshavardhana
parent
0db484c8f6
commit
8ceb969445
@@ -161,7 +161,7 @@ func testTreeWalkMarker(t *testing.T, listDir listDirFunc, isLeaf isLeafFunc) {
|
||||
|
||||
// Test tree-walk.
|
||||
func TestTreeWalk(t *testing.T) {
|
||||
fsDir, err := ioutil.TempDir("", "minio-")
|
||||
fsDir, err := ioutil.TempDir(globalTestTmpDir, "minio-")
|
||||
if err != nil {
|
||||
t.Fatalf("Unable to create tmp directory: %s", err)
|
||||
}
|
||||
@@ -202,7 +202,7 @@ func TestTreeWalk(t *testing.T) {
|
||||
|
||||
// Test if tree walk go-routine exits cleanly if tree walk is aborted because of timeout.
|
||||
func TestTreeWalkTimeout(t *testing.T) {
|
||||
fsDir, err := ioutil.TempDir("", "minio-")
|
||||
fsDir, err := ioutil.TempDir(globalTestTmpDir, "minio-")
|
||||
if err != nil {
|
||||
t.Fatalf("Unable to create tmp directory: %s", err)
|
||||
}
|
||||
@@ -277,11 +277,11 @@ func TestListDir(t *testing.T) {
|
||||
file1 := "file1"
|
||||
file2 := "file2"
|
||||
// Create two backend directories fsDir1 and fsDir2.
|
||||
fsDir1, err := ioutil.TempDir("", "minio-")
|
||||
fsDir1, err := ioutil.TempDir(globalTestTmpDir, "minio-")
|
||||
if err != nil {
|
||||
t.Errorf("Unable to create tmp directory: %s", err)
|
||||
}
|
||||
fsDir2, err := ioutil.TempDir("", "minio-")
|
||||
fsDir2, err := ioutil.TempDir(globalTestTmpDir, "minio-")
|
||||
if err != nil {
|
||||
t.Errorf("Unable to create tmp directory: %s", err)
|
||||
}
|
||||
@@ -360,7 +360,7 @@ func TestListDir(t *testing.T) {
|
||||
// without recursively traversing prefixes.
|
||||
func TestRecursiveTreeWalk(t *testing.T) {
|
||||
// Create a backend directories fsDir1.
|
||||
fsDir1, err := ioutil.TempDir("", "minio-")
|
||||
fsDir1, err := ioutil.TempDir(globalTestTmpDir, "minio-")
|
||||
if err != nil {
|
||||
t.Fatalf("Unable to create tmp directory: %s", err)
|
||||
}
|
||||
@@ -470,7 +470,7 @@ func TestRecursiveTreeWalk(t *testing.T) {
|
||||
|
||||
func TestSortedness(t *testing.T) {
|
||||
// Create a backend directories fsDir1.
|
||||
fsDir1, err := ioutil.TempDir("", "minio-")
|
||||
fsDir1, err := ioutil.TempDir(globalTestTmpDir, "minio-")
|
||||
if err != nil {
|
||||
t.Errorf("Unable to create tmp directory: %s", err)
|
||||
}
|
||||
@@ -548,7 +548,7 @@ func TestSortedness(t *testing.T) {
|
||||
|
||||
func TestTreeWalkIsEnd(t *testing.T) {
|
||||
// Create a backend directories fsDir1.
|
||||
fsDir1, err := ioutil.TempDir("", "minio-")
|
||||
fsDir1, err := ioutil.TempDir(globalTestTmpDir, "minio-")
|
||||
if err != nil {
|
||||
t.Errorf("Unable to create tmp directory: %s", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user