diff options
author | n-peugnet <n.peugnet@free.fr> | 2021-10-06 14:46:38 +0200 |
---|---|---|
committer | n-peugnet <n.peugnet@free.fr> | 2021-10-06 14:46:38 +0200 |
commit | 763c6b985da74078e8683fa83b3f599619deb00d (patch) | |
tree | 06dbaad6b565481942fb024f16354b93bcaa21dd /repo/repo_test.go | |
parent | 21a8ea292cc715fd22df7ef52bf6e1675bfc7dc4 (diff) | |
download | dna-backup-763c6b985da74078e8683fa83b3f599619deb00d.tar.gz dna-backup-763c6b985da74078e8683fa83b3f599619deb00d.zip |
use repo deltacodec for recipe and files
this should not only be more efficient in space but also in time
drop old Commit and Restore tests that do not use compression
Diffstat (limited to 'repo/repo_test.go')
-rw-r--r-- | repo/repo_test.go | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/repo/repo_test.go b/repo/repo_test.go index 0d26ccd..36cc1bd 100644 --- a/repo/repo_test.go +++ b/repo/repo_test.go @@ -337,27 +337,13 @@ func TestBsdiff(t *testing.T) { } } -func TestCommit(t *testing.T) { - dest := t.TempDir() - source := filepath.Join("testdata", "logs") - expected := filepath.Join("testdata", "repo_8k") - repo := NewRepo(dest) - repo.patcher = delta.Bsdiff{} - repo.differ = delta.Bsdiff{} - repo.chunkReadWrapper = utils.NopReadWrapper - repo.chunkWriteWrapper = utils.NopWriteWrapper - - repo.Commit(source) - assertSameTree(t, assertCompatibleRepoFile, expected, dest, "Commit") -} - func TestCommitZlib(t *testing.T) { dest := t.TempDir() source := filepath.Join("testdata", "logs") expected := filepath.Join("testdata", "repo_8k_zlib") repo := NewRepo(dest) - repo.patcher = delta.Bsdiff{} - repo.differ = delta.Bsdiff{} + repo.patcher = delta.Fdelta{} + repo.differ = delta.Fdelta{} repo.chunkReadWrapper = utils.ZlibReader repo.chunkWriteWrapper = utils.ZlibWriter @@ -365,22 +351,6 @@ func TestCommitZlib(t *testing.T) { assertSameTree(t, assertCompatibleRepoFile, expected, dest, "Commit") } -func TestRestore(t *testing.T) { - logger.SetLevel(2) - defer logger.SetLevel(4) - dest := t.TempDir() - source := filepath.Join("testdata", "repo_8k") - expected := filepath.Join("testdata", "logs") - repo := NewRepo(source) - repo.patcher = delta.Bsdiff{} - repo.differ = delta.Bsdiff{} - repo.chunkReadWrapper = utils.NopReadWrapper - repo.chunkWriteWrapper = utils.NopWriteWrapper - - repo.Restore(dest) - assertSameTree(t, testutils.AssertSameFile, expected, dest, "Restore") -} - func TestRestoreZlib(t *testing.T) { logger.SetLevel(2) defer logger.SetLevel(4) @@ -388,8 +358,8 @@ func TestRestoreZlib(t *testing.T) { source := filepath.Join("testdata", "repo_8k_zlib") expected := filepath.Join("testdata", "logs") repo := NewRepo(source) - repo.patcher = delta.Bsdiff{} - repo.differ = delta.Bsdiff{} + repo.patcher = delta.Fdelta{} + repo.differ = delta.Fdelta{} repo.chunkReadWrapper = utils.ZlibReader repo.chunkWriteWrapper = utils.ZlibWriter |