aboutsummaryrefslogtreecommitdiff
path: root/repo_test.go
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-09-15 15:06:30 +0200
committern-peugnet <n.peugnet@free.fr>2021-09-15 15:06:30 +0200
commit2f20511f442cecc764c817709c4358a149984766 (patch)
tree332d84e7fd4da60ebc4ab994ccd23650540804d7 /repo_test.go
parent8893edbf525c7daaaeb530e0964c06d5aa080c3d (diff)
downloaddna-backup-2f20511f442cecc764c817709c4358a149984766.tar.gz
dna-backup-2f20511f442cecc764c817709c4358a149984766.zip
add storeWorker and use it to store chunk content and hashes
Diffstat (limited to 'repo_test.go')
-rw-r--r--repo_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/repo_test.go b/repo_test.go
index f6f6edd..cf88224 100644
--- a/repo_test.go
+++ b/repo_test.go
@@ -230,11 +230,13 @@ func TestBsdiff(t *testing.T) {
// Load previously stored chunks
oldChunks := make(chan IdentifiedChunk, 16)
versions := repo.loadVersions()
- newVersion := len(versions)
go repo.loadChunks(versions, oldChunks)
repo.hashChunks(oldChunks)
// Read new data
+ newVersion := len(versions)
+ newPath := filepath.Join(repo.path, fmt.Sprintf(versionFmt, newVersion))
+ os.MkdirAll(newPath, 0775)
reader := getDataStream(dataDir, concatFiles)
recipe := repo.matchStream(reader, newVersion)
newChunks := extractDeltaChunks(recipe)
@@ -341,10 +343,8 @@ func assertCompatibleRepoFile(t *testing.T, expected string, actual string, pref
t.Fatal(prefix, "chunk do not match:", aRecipe[i], ", expected", eChunk)
}
}
- } else if filepath.Base(expected) == sketchesName {
- // TODO: check Sketches file
- } else if filepath.Base(expected) == fingerprintsName {
- // TODO: check Fingerprints file
+ } else if filepath.Base(expected) == hashesName {
+ // TODO: check Hashes file
} else {
// Chunk content file
assertSameFile(t, expected, actual, prefix)