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 ( import (
"fmt" "fmt"
"io"
"os" "os"
"path/filepath" "path/filepath"
"reflect" "reflect"
@ -70,9 +71,9 @@ func (s *FileSystem) Clean() error {
} }
_ = pt _ = pt
// if err := s.RemoveAll(pt.Name); err != nil { if err := s.RemoveAll(pt.Name); err != nil {
// return err return err
// } }
// //
// if _, err := s.Stat(pt.Name); err == nil { // if _, err := s.Stat(pt.Name); err == nil {
// return fmt.Errorf("expected %q to be, you know, not there any more", pt) // 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) pt, err := s.Parse(tt.in)
r.NoError(err) r.NoError(err)
// r.Fail(pt.String()) r.Fail(pt.String())
// f, err := s.Create(tt.in) f, err := s.Create(tt.in)
// r.NoError(err) r.NoError(err)
// _, err = io.Copy(f, strings.NewReader("!"+pt.String())) _, err = io.Copy(f, strings.NewReader("!"+pt.String()))
// r.NoError(err) r.NoError(err)
// r.NoError(f.Close()) r.NoError(f.Close())
info, err := s.Stat(tt.in) info, err := s.Stat(tt.in)
r.NoError(err) r.NoError(err)

View File

@ -1,6 +1,7 @@
package hdfs package hdfs
import ( import (
"path/filepath"
"testing" "testing"
"github.com/markbates/pkger/fs/fstest" "github.com/markbates/pkger/fs/fstest"
@ -13,6 +14,9 @@ func Test_FS(t *testing.T) {
myfs, err := New() myfs, err := New()
r.NoError(err) r.NoError(err)
myfs.current.Dir = filepath.Join(myfs.current.Dir, ".fstest")
myfs.paths.Current = myfs.current
suite, err := fstest.NewFileSystem(myfs) suite, err := fstest.NewFileSystem(myfs)
r.NoError(err) r.NoError(err)