mirror of
https://github.com/restic/restic.git
synced 2025-12-11 18:47:50 +00:00
use consistent alias for interal/test package
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/restic/restic/internal/fs"
|
||||
"github.com/restic/restic/internal/repository"
|
||||
restictest "github.com/restic/restic/internal/test"
|
||||
rtest "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
// MockT passes through all logging functions from T, but catches Fail(),
|
||||
@@ -101,7 +101,7 @@ func TestTestCreateFiles(t *testing.T) {
|
||||
}
|
||||
|
||||
for i, test := range tests {
|
||||
tempdir := restictest.TempDir(t)
|
||||
tempdir := rtest.TempDir(t)
|
||||
|
||||
t.Run("", func(t *testing.T) {
|
||||
tempdir := filepath.Join(tempdir, fmt.Sprintf("test-%d", i))
|
||||
@@ -191,7 +191,7 @@ func TestTestWalkFiles(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run("", func(t *testing.T) {
|
||||
tempdir := restictest.TempDir(t)
|
||||
tempdir := rtest.TempDir(t)
|
||||
|
||||
got := make(map[string]string)
|
||||
|
||||
@@ -321,7 +321,7 @@ func TestTestEnsureFiles(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run("", func(t *testing.T) {
|
||||
tempdir := restictest.TempDir(t)
|
||||
tempdir := rtest.TempDir(t)
|
||||
createFilesAt(t, tempdir, test.files)
|
||||
|
||||
subtestT := testing.TB(t)
|
||||
@@ -452,7 +452,7 @@ func TestTestEnsureSnapshot(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
tempdir := restictest.TempDir(t)
|
||||
tempdir := rtest.TempDir(t)
|
||||
|
||||
targetDir := filepath.Join(tempdir, "target")
|
||||
err := fs.Mkdir(targetDir, 0700)
|
||||
@@ -462,7 +462,7 @@ func TestTestEnsureSnapshot(t *testing.T) {
|
||||
|
||||
createFilesAt(t, targetDir, test.files)
|
||||
|
||||
back := restictest.Chdir(t, tempdir)
|
||||
back := rtest.Chdir(t, tempdir)
|
||||
defer back()
|
||||
|
||||
repo := repository.TestRepository(t)
|
||||
|
||||
Reference in New Issue
Block a user