mirror of
https://github.com/restic/restic.git
synced 2025-12-12 03:31:56 +00:00
data: split node and snapshot code from restic package
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
"github.com/restic/restic/internal/checker"
|
||||
"github.com/restic/restic/internal/crypto"
|
||||
"github.com/restic/restic/internal/data"
|
||||
"github.com/restic/restic/internal/repository"
|
||||
"github.com/restic/restic/internal/repository/index"
|
||||
"github.com/restic/restic/internal/restic"
|
||||
@@ -350,7 +351,7 @@ func createFilledRepo(t testing.TB, snapshots int, version uint) (restic.Reposit
|
||||
repo, unpacked, _ := repository.TestRepositoryWithVersion(t, version)
|
||||
|
||||
for i := 0; i < snapshots; i++ {
|
||||
restic.TestCreateSnapshot(t, repo, snapshotTime.Add(time.Duration(i)*time.Second), depth)
|
||||
data.TestCreateSnapshot(t, repo, snapshotTime.Add(time.Duration(i)*time.Second), depth)
|
||||
}
|
||||
return repo, unpacked
|
||||
}
|
||||
@@ -423,7 +424,7 @@ func testIndexSavePartial(t *testing.T, version uint) {
|
||||
|
||||
// add+remove new snapshot and track its pack files
|
||||
packsBefore := listPacks(t, repo)
|
||||
sn := restic.TestCreateSnapshot(t, repo, snapshotTime.Add(time.Duration(4)*time.Second), depth)
|
||||
sn := data.TestCreateSnapshot(t, repo, snapshotTime.Add(time.Duration(4)*time.Second), depth)
|
||||
rtest.OK(t, repo.RemoveUnpacked(context.TODO(), restic.WriteableSnapshotFile, *sn.ID()))
|
||||
packsAfter := listPacks(t, repo)
|
||||
newPacks := packsAfter.Sub(packsBefore)
|
||||
|
||||
Reference in New Issue
Block a user