mirror of
https://github.com/restic/restic.git
synced 2026-09-11 06:57:58 +00:00
Check in integration test that snapshots are listed before the index
As an exception prune is still allowed to load the index before snapshots, as it uses exclusive locks. In case of problems with locking it is also better to load snapshots created after loading the index, as this will lead to a prune sanity check failure instead of a broken snapshot.
This commit is contained in:
@@ -154,6 +154,8 @@ func TestMount(t *testing.T) {
|
||||
}
|
||||
|
||||
env, cleanup := withTestEnvironment(t)
|
||||
// must list snapshots more than once
|
||||
env.gopts.backendTestHook = nil
|
||||
defer cleanup()
|
||||
|
||||
testRunInit(t, env.gopts)
|
||||
@@ -197,6 +199,8 @@ func TestMountSameTimestamps(t *testing.T) {
|
||||
}
|
||||
|
||||
env, cleanup := withTestEnvironment(t)
|
||||
// must list snapshots more than once
|
||||
env.gopts.backendTestHook = nil
|
||||
defer cleanup()
|
||||
|
||||
rtest.SetupTarTestFixture(t, env.base, filepath.Join("testdata", "repo-same-timestamps.tar.gz"))
|
||||
|
||||
Reference in New Issue
Block a user