mirror of
https://github.com/octoleo/restic.git
synced 2024-11-27 07:16:40 +00:00
Last fixes for integration tests
This commit is contained in:
parent
f7ae0cb78f
commit
528c301891
@ -13,7 +13,6 @@ import (
|
|||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
"restic"
|
"restic"
|
||||||
"restic/backend"
|
|
||||||
"restic/repository"
|
"restic/repository"
|
||||||
. "restic/test"
|
. "restic/test"
|
||||||
)
|
)
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"restic/repository"
|
||||||
. "restic/test"
|
. "restic/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -193,6 +194,8 @@ func withTestEnvironment(t testing.TB, f func(*testEnvironment, GlobalOptions))
|
|||||||
t.Skip("integration tests disabled")
|
t.Skip("integration tests disabled")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repository.TestUseLowSecurityKDFParameters(t)
|
||||||
|
|
||||||
tempdir, err := ioutil.TempDir(TestTempDir, "restic-test-")
|
tempdir, err := ioutil.TempDir(TestTempDir, "restic-test-")
|
||||||
OK(t, err)
|
OK(t, err)
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@ import (
|
|||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
"restic/backend"
|
|
||||||
"restic/debug"
|
"restic/debug"
|
||||||
"restic/filter"
|
"restic/filter"
|
||||||
"restic/repository"
|
"restic/repository"
|
||||||
@ -30,7 +29,7 @@ func parseIDsFromReader(t testing.TB, rd io.Reader) restic.IDs {
|
|||||||
sc := bufio.NewScanner(rd)
|
sc := bufio.NewScanner(rd)
|
||||||
|
|
||||||
for sc.Scan() {
|
for sc.Scan() {
|
||||||
id, err := backend.ParseID(sc.Text())
|
id, err := restic.ParseID(sc.Text())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Logf("parse id %v: %v", sc.Text(), err)
|
t.Logf("parse id %v: %v", sc.Text(), err)
|
||||||
continue
|
continue
|
||||||
@ -811,11 +810,11 @@ func TestRebuildIndexAlwaysFull(t *testing.T) {
|
|||||||
|
|
||||||
var optimizeTests = []struct {
|
var optimizeTests = []struct {
|
||||||
testFilename string
|
testFilename string
|
||||||
snapshots backend.IDSet
|
snapshots restic.IDSet
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
filepath.Join("..", "..", "restic", "checker", "testdata", "checker-test-repo.tar.gz"),
|
filepath.Join("..", "..", "restic", "checker", "testdata", "checker-test-repo.tar.gz"),
|
||||||
backend.NewIDSet(ParseID("a13c11e582b77a693dd75ab4e3a3ba96538a056594a4b9076e4cacebe6e06d43")),
|
restic.NewIDSet(ParseID("a13c11e582b77a693dd75ab4e3a3ba96538a056594a4b9076e4cacebe6e06d43")),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
filepath.Join("testdata", "old-index-repo.tar.gz"),
|
filepath.Join("testdata", "old-index-repo.tar.gz"),
|
||||||
@ -823,7 +822,7 @@ var optimizeTests = []struct {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
filepath.Join("testdata", "old-index-repo.tar.gz"),
|
filepath.Join("testdata", "old-index-repo.tar.gz"),
|
||||||
backend.NewIDSet(
|
restic.NewIDSet(
|
||||||
ParseID("f7d83db709977178c9d1a09e4009355e534cde1a135b8186b8b118a3fc4fcd41"),
|
ParseID("f7d83db709977178c9d1a09e4009355e534cde1a135b8186b8b118a3fc4fcd41"),
|
||||||
ParseID("51d249d28815200d59e4be7b3f21a157b864dc343353df9d8e498220c2499b02"),
|
ParseID("51d249d28815200d59e4be7b3f21a157b864dc343353df9d8e498220c2499b02"),
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user