aboutsummaryrefslogtreecommitdiff
path: root/repo_test.go
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-09-13 11:36:54 +0200
committern-peugnet <n.peugnet@free.fr>2021-09-13 11:47:28 +0200
commitcb548fedb8668be2cdd18d310ef77e1fef8c5fcb (patch)
treeb81f3660d8d1898e835e0779cfa4badea4537e0b /repo_test.go
parente8b48ddece267bfde7c0565a8ec39fd5b53cee72 (diff)
downloaddna-backup-cb548fedb8668be2cdd18d310ef77e1fef8c5fcb.tar.gz
dna-backup-cb548fedb8668be2cdd18d310ef77e1fef8c5fcb.zip
fix golint ci errors
Diffstat (limited to 'repo_test.go')
-rw-r--r--repo_test.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/repo_test.go b/repo_test.go
index 93b1e75..1a19157 100644
--- a/repo_test.go
+++ b/repo_test.go
@@ -96,7 +96,8 @@ func storeChunks(dest string, chunks <-chan []byte) {
}
func TestReadFiles1(t *testing.T) {
- repo := NewRepo("")
+ tmpDir := t.TempDir()
+ repo := NewRepo(tmpDir)
chunkCount := 590/repo.chunkSize + 1
dataDir := path.Join("testdata", "logs", "1")
files := []string{"logTest.log"}
@@ -104,7 +105,8 @@ func TestReadFiles1(t *testing.T) {
}
func TestReadFiles2(t *testing.T) {
- repo := NewRepo("")
+ tmpDir := t.TempDir()
+ repo := NewRepo(tmpDir)
chunkCount := 22899/repo.chunkSize + 1
dataDir := path.Join("testdata", "logs", "2")
files := []string{"csvParserTest.log", "slipdb.log"}
@@ -112,7 +114,8 @@ func TestReadFiles2(t *testing.T) {
}
func TestReadFiles3(t *testing.T) {
- repo := NewRepo("")
+ tmpDir := t.TempDir()
+ repo := NewRepo(tmpDir)
chunkCount := 119398/repo.chunkSize + 1
dataDir := path.Join("testdata", "logs")
files := []string{