aboutsummaryrefslogtreecommitdiff
path: root/repo
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-10-13 15:16:19 +0200
committern-peugnet <n.peugnet@free.fr>2021-10-13 15:16:19 +0200
commit57bd3d4633a85f5cf103aae1dd6f0f607a26ef8c (patch)
tree0e16acae9a6d322920032003e10d10e9e936cb72 /repo
parente0482eff8323bd5f2133078c8b809d757f9725be (diff)
downloaddna-backup-57bd3d4633a85f5cf103aae1dd6f0f607a26ef8c.tar.gz
dna-backup-57bd3d4633a85f5cf103aae1dd6f0f607a26ef8c.zip
fix TestHashes
IDK why it didn't crash earlier
Diffstat (limited to 'repo')
-rw-r--r--repo/repo_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/repo/repo_test.go b/repo/repo_test.go
index e3a49c7..a7d35a4 100644
--- a/repo/repo_test.go
+++ b/repo/repo_test.go
@@ -387,15 +387,15 @@ func TestRoundtrip(t *testing.T) {
func TestHashes(t *testing.T) {
dest := t.TempDir()
- source := filepath.Join("testdata", "repo_8k")
+ source := filepath.Join("testdata", "repo_8k_zlib")
chunks := make(chan IdentifiedChunk, 16)
storeQueue := make(chan chunkData, 16)
storeEnd := make(chan bool)
repo1 := NewRepo(source, 8<<10)
- repo1.chunkReadWrapper = utils.NopReadWrapper
- repo1.chunkWriteWrapper = utils.NopWriteWrapper
+ repo1.chunkReadWrapper = utils.ZlibReader
+ repo1.chunkWriteWrapper = utils.ZlibWriter
go repo1.loadChunks([]string{filepath.Join(source, "00000")}, chunks)
for c := range chunks {
fp, sk := repo1.hashChunk(c.GetId(), c.Reader())