From 3e0123b9d8a1097e74fcd500b72cbdaa00c7a49a Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Mon, 13 Sep 2021 15:23:32 +0200 Subject: 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. --- repo_test.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'repo_test.go') 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) -- cgit v1.2.3