aboutsummaryrefslogtreecommitdiff
path: root/repo_test.go
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-09-13 15:23:32 +0200
committern-peugnet <n.peugnet@free.fr>2021-09-13 15:25:11 +0200
commit3e0123b9d8a1097e74fcd500b72cbdaa00c7a49a (patch)
treee88736021d21463717011ab0771a3637697c0217 /repo_test.go
parent7f65509f10704a0fbe2ad7e227eee1d0babc9c93 (diff)
downloaddna-backup-3e0123b9d8a1097e74fcd500b72cbdaa00c7a49a.tar.gz
dna-backup-3e0123b9d8a1097e74fcd500b72cbdaa00c7a49a.zip
fix loadChunks by using cache instead of reading file
This way there is only one place where we read chunks and where the read/write wrapper is used. This also allows to remove LoadedChunk as it is not used anymore.
Diffstat (limited to 'repo_test.go')
-rw-r--r--repo_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/repo_test.go b/repo_test.go
index 39556c6..8748d88 100644
--- a/repo_test.go
+++ b/repo_test.go
@@ -131,6 +131,8 @@ func TestLoadChunks(t *testing.T) {
resultDir := t.TempDir()
dataDir := filepath.Join("testdata", "logs")
repo := NewRepo(resultDir)
+ repo.chunkReadWrapper = dummyReader
+ repo.chunkWriteWrapper = dummyWriter
resultVersion := filepath.Join(resultDir, "00000")
resultChunks := filepath.Join(resultVersion, chunksName)
os.MkdirAll(resultChunks, 0775)