mirror of
https://github.com/octoleo/restic.git
synced 2024-11-21 20:35:12 +00:00
copy: test that trees with unstable json encoding are properly copied
This commit is contained in:
parent
2fc7abac35
commit
427781928f
@ -799,6 +799,25 @@ func TestCopyIncremental(t *testing.T) {
|
||||
len(copiedSnapshotIDs), len(snapshotIDs))
|
||||
}
|
||||
|
||||
func TestCopyUnstableJSON(t *testing.T) {
|
||||
env, cleanup := withTestEnvironment(t)
|
||||
defer cleanup()
|
||||
env2, cleanup2 := withTestEnvironment(t)
|
||||
defer cleanup2()
|
||||
|
||||
// contains a symlink created using `ln -s '../i/'$'\355\246\361''d/samba' broken-symlink`
|
||||
datafile := filepath.Join("testdata", "copy-unstable-json.tar.gz")
|
||||
rtest.SetupTarTestFixture(t, env.base, datafile)
|
||||
|
||||
testRunInit(t, env2.gopts)
|
||||
testRunCopy(t, env.gopts, env2.gopts)
|
||||
testRunCheck(t, env2.gopts)
|
||||
|
||||
copiedSnapshotIDs := testRunList(t, "snapshots", env2.gopts)
|
||||
rtest.Assert(t, 1 == len(copiedSnapshotIDs), "still expected %v snapshot, found %v",
|
||||
1, len(copiedSnapshotIDs))
|
||||
}
|
||||
|
||||
func TestInitCopyChunkerParams(t *testing.T) {
|
||||
env, cleanup := withTestEnvironment(t)
|
||||
defer cleanup()
|
||||
|
BIN
cmd/restic/testdata/copy-unstable-json.tar.gz
vendored
Normal file
BIN
cmd/restic/testdata/copy-unstable-json.tar.gz
vendored
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user