Skip to content

Commit 1b9ca29

Browse files
committed
fix tests that create local object storage test directory in os temp dir
1 parent bf0c532 commit 1b9ca29

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/storage/local_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ package storage
66
import (
77
"bytes"
88
"context"
9+
"os"
10+
"path/filepath"
911
"testing"
1012

1113
"github.com/stretchr/testify/assert"
@@ -54,7 +56,8 @@ func TestBuildLocalPath(t *testing.T) {
5456
}
5557

5658
func TestLocalStorageIterator(t *testing.T) {
57-
l, err := NewLocalStorage(context.Background(), LocalStorageConfig{Path: "testdata/"})
59+
dir := filepath.Join(os.TempDir(), "TestLocalStorageIteratorTestDir")
60+
l, err := NewLocalStorage(context.Background(), LocalStorageConfig{Path: dir})
5861
assert.NoError(t, err)
5962

6063
testFiles := [][]string{

0 commit comments

Comments
 (0)