lib: Get rid of buggy filesystem wrapping (#8257)

This commit is contained in:
Simon Frei
2022-04-10 20:55:05 +02:00
committed by GitHub
parent 9b09bcc5f1
commit db72579f0e
26 changed files with 226 additions and 189 deletions
+9 -5
View File
@@ -38,10 +38,14 @@ type testfile struct {
type testfileList []testfile
const (
testFsType = fs.FilesystemTypeBasic
testFsLocation = "testdata"
)
var (
testFs fs.Filesystem
testFsType = fs.FilesystemTypeBasic
testdata = testfileList{
testFs fs.Filesystem
testdata = testfileList{
{"afile", 4, "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c"},
{"dir1", 128, ""},
{filepath.Join("dir1", "dfile"), 5, "49ae93732fcf8d63fe1cce759664982dbd5b23161f007dba8561862adc96d063"},
@@ -58,7 +62,7 @@ func init() {
// potentially taking down the box...
rdebug.SetMaxStack(10 * 1 << 20)
testFs = fs.NewFilesystem(fs.FilesystemTypeBasic, "testdata")
testFs = fs.NewFilesystem(testFsType, testFsLocation)
}
func TestWalkSub(t *testing.T) {
@@ -258,7 +262,7 @@ func TestNormalizationDarwinCaseFS(t *testing.T) {
return
}
testFs := fs.NewCaseFilesystem(testFs)
testFs := fs.NewFilesystem(testFsType, testFsLocation, new(fs.OptionDetectCaseConflicts))
testFs.RemoveAll("normalization")
defer testFs.RemoveAll("normalization")