interstate love song

This commit is contained in:
Mark Bates 2019-09-01 15:59:42 -04:00
parent 926eafe520
commit f1cffaa166
2 changed files with 14 additions and 9 deletions

View File

@ -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)

View File

@ -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)