mirror of
https://github.com/restic/restic.git
synced 2026-11-22 05:14:23 +00:00
fs: unexport Local and expose via NewLocal
This commit is contained in:
1 parent
1acc19dac5
commit
e1e7fc8fb2
20 files changed
+72
-67
No files matched your search
@@ -98,7 +98,7 @@ func TestPathComponents(t *testing.T) {
|
||||
t.Skip("skip test on unix")
|
||||
}
|
||||
|
||||
c, v := pathComponents(fs.Local{}, filepath.FromSlash(test.p), test.rel)
|
||||
c, v := pathComponents(fs.NewLocal(), filepath.FromSlash(test.p), test.rel)
|
||||
if !cmp.Equal(test.c, c) {
|
||||
t.Error(test.c, c)
|
||||
}
|
||||
@@ -137,7 +137,7 @@ func TestRootDirectory(t *testing.T) {
|
||||
t.Skip("skip test on unix")
|
||||
}
|
||||
|
||||
root := rootDirectory(fs.Local{}, filepath.FromSlash(test.target))
|
||||
root := rootDirectory(fs.NewLocal(), filepath.FromSlash(test.target))
|
||||
want := filepath.FromSlash(test.root)
|
||||
if root != want {
|
||||
t.Fatalf("wrong root directory, want %v, got %v", want, root)
|
||||
@@ -455,7 +455,7 @@ func TestTree(t *testing.T) {
|
||||
back := rtest.Chdir(t, tempdir)
|
||||
defer back()
|
||||
|
||||
tree, err := newTree(fs.Local{}, testBackupTargets(test.targets))
|
||||
tree, err := newTree(fs.NewLocal(), testBackupTargets(test.targets))
|
||||
if test.mustError {
|
||||
if err == nil {
|
||||
t.Fatal("expected error, got nil")
|
||||
|
||||
Reference in new issue
Block a user