aboutsummaryrefslogtreecommitdiff
path: root/repo_test.go
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-09-23 18:10:30 +0200
committern-peugnet <n.peugnet@free.fr>2021-09-23 18:10:30 +0200
commita07bbe4ef22d642347d18f0e0a62d24868500d23 (patch)
treedd634dc57d5525033146c197dc6822a8c0466eb0 /repo_test.go
parente4f6bf0d972b8e851a6fcaa20c1f305680f61884 (diff)
downloaddna-backup-a07bbe4ef22d642347d18f0e0a62d24868500d23.tar.gz
dna-backup-a07bbe4ef22d642347d18f0e0a62d24868500d23.zip
Testing with Fdelta as the differ
Diffstat (limited to 'repo_test.go')
-rw-r--r--repo_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/repo_test.go b/repo_test.go
index 2d1c6e2..2205e63 100644
--- a/repo_test.go
+++ b/repo_test.go
@@ -234,6 +234,8 @@ func TestBsdiff(t *testing.T) {
defer os.Remove(addedFile2)
// configure repo
+ repo.patcher = Bsdiff{}
+ repo.differ = Bsdiff{}
repo.chunkReadWrapper = utils.NopReadWrapper
repo.chunkWriteWrapper = utils.NopWriteWrapper
@@ -269,6 +271,8 @@ func TestCommit(t *testing.T) {
source := filepath.Join("testdata", "logs")
expected := filepath.Join("testdata", "repo_8k")
repo := NewRepo(dest)
+ repo.patcher = Bsdiff{}
+ repo.differ = Bsdiff{}
repo.chunkReadWrapper = utils.NopReadWrapper
repo.chunkWriteWrapper = utils.NopWriteWrapper
@@ -281,6 +285,8 @@ func TestCommitZlib(t *testing.T) {
source := filepath.Join("testdata", "logs")
expected := filepath.Join("testdata", "repo_8k_zlib")
repo := NewRepo(dest)
+ repo.patcher = Bsdiff{}
+ repo.differ = Bsdiff{}
repo.chunkReadWrapper = utils.ZlibReader
repo.chunkWriteWrapper = utils.ZlibWriter
@@ -293,6 +299,8 @@ func TestRestore(t *testing.T) {
source := filepath.Join("testdata", "repo_8k")
expected := filepath.Join("testdata", "logs")
repo := NewRepo(source)
+ repo.patcher = Bsdiff{}
+ repo.differ = Bsdiff{}
repo.chunkReadWrapper = utils.NopReadWrapper
repo.chunkWriteWrapper = utils.NopWriteWrapper
@@ -305,6 +313,8 @@ func TestRestoreZlib(t *testing.T) {
source := filepath.Join("testdata", "repo_8k_zlib")
expected := filepath.Join("testdata", "logs")
repo := NewRepo(source)
+ repo.patcher = Bsdiff{}
+ repo.differ = Bsdiff{}
repo.chunkReadWrapper = utils.ZlibReader
repo.chunkWriteWrapper = utils.ZlibWriter