diff --git a/fs/fstest/suite.go b/fs/fstest/suite.go index 071cfbc..e6c09f7 100644 --- a/fs/fstest/suite.go +++ b/fs/fstest/suite.go @@ -2,6 +2,7 @@ package fstest import ( "fmt" + "io" "os" "path/filepath" "reflect" @@ -70,9 +71,9 @@ func (s *FileSystem) Clean() error { } _ = pt - // if err := s.RemoveAll(pt.Name); err != nil { - // return err - // } + if err := s.RemoveAll(pt.Name); err != nil { + return err + } // // if _, err := s.Stat(pt.Name); err == nil { // return fmt.Errorf("expected %q to be, you know, not there any more", pt) @@ -195,12 +196,12 @@ func (s *FileSystem) Test_Stat(t *testing.T) { pt, err := s.Parse(tt.in) r.NoError(err) - // r.Fail(pt.String()) - // f, err := s.Create(tt.in) - // r.NoError(err) - // _, err = io.Copy(f, strings.NewReader("!"+pt.String())) - // r.NoError(err) - // r.NoError(f.Close()) + r.Fail(pt.String()) + f, err := s.Create(tt.in) + r.NoError(err) + _, err = io.Copy(f, strings.NewReader("!"+pt.String())) + r.NoError(err) + r.NoError(f.Close()) info, err := s.Stat(tt.in) r.NoError(err) diff --git a/fs/hdfs/hdfs_test.go b/fs/hdfs/hdfs_test.go index 2804acc..4d95a20 100644 --- a/fs/hdfs/hdfs_test.go +++ b/fs/hdfs/hdfs_test.go @@ -1,6 +1,7 @@ package hdfs import ( + "path/filepath" "testing" "github.com/markbates/pkger/fs/fstest" @@ -13,6 +14,9 @@ func Test_FS(t *testing.T) { myfs, err := New() r.NoError(err) + myfs.current.Dir = filepath.Join(myfs.current.Dir, ".fstest") + myfs.paths.Current = myfs.current + suite, err := fstest.NewFileSystem(myfs) r.NoError(err)