enhance: use random root path for minio unit tests (#29753)

this avoids the conflicts while running multiple unit tests

Signed-off-by: yah01 <yah2er0ne@outlook.com>
This commit is contained in:
yah01 2024-01-08 15:58:48 +08:00 committed by GitHub
parent 9702cef2b5
commit 97e4ec5a69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,7 @@ package storage
import (
"context"
"fmt"
"io"
"math/rand"
"path"
@ -85,7 +86,7 @@ func TestMinIOCM(t *testing.T) {
configRoot := Params.MinioCfg.RootPath.GetValue()
testMinIOKVRoot := path.Join(configRoot, "milvus-minio-ut-root")
testMinIOKVRoot := path.Join(configRoot, fmt.Sprintf("minio-ut-%d", rand.Int()))
t.Run("test load", func(t *testing.T) {
testLoadRoot := path.Join(testMinIOKVRoot, "test_load")