diff --git a/Makefile b/Makefile index 304b497..8ac1886 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ build: tidy make tidy test: tidy - $(GO_BIN) test -cover -tags ${TAGS} -timeout 5s ./... + $(GO_BIN) test -count 1 -cover -tags ${TAGS} -timeout 10s ./... make tidy cov: diff --git a/here/dir.go b/here/dir.go index 809f4fa..1fb0771 100644 --- a/here/dir.go +++ b/here/dir.go @@ -2,7 +2,6 @@ package here import ( "encoding/json" - "fmt" "os" "path/filepath" ) @@ -93,9 +92,9 @@ func dir(p string) (Info, error) { } func fromNonGoDir(dir string) (Info, error) { - fmt.Println(">>>TODO here/dir.go:59: dir ", dir) i := Info{ - Dir: dir, + Dir: dir, + Name: filepath.Base(dir), } b, err := run("go", "list", "-json", "-m") diff --git a/here/dir_test.go b/here/dir_test.go index 044e077..f81d0ce 100644 --- a/here/dir_test.go +++ b/here/dir_test.go @@ -49,13 +49,18 @@ func Test_Dir(t *testing.T) { t.Run(tt.in, func(st *testing.T) { r := require.New(st) - _, err = here.Dir(tt.in) + info, err := here.Dir(tt.in) if tt.err { r.Error(err) return } r.NoError(err) + r.NotZero(info) + r.NotZero(info.Dir) + r.NotZero(info.Name) + r.NotZero(info.Module) + }) } } diff --git a/pkging/pkgtest/ref.go b/pkging/pkgtest/ref.go index 3c1562d..fa421ad 100644 --- a/pkging/pkgtest/ref.go +++ b/pkging/pkgtest/ref.go @@ -17,7 +17,6 @@ type Ref struct { } func NewRef() (*Ref, error) { - here.ClearCache() her, err := here.Package("github.com/markbates/pkger") if err != nil { return nil, err diff --git a/pkging/pkgtest/testdata/ref/go.mod b/pkging/pkgtest/testdata/ref/go.mod index 18f4f20..a335439 100644 --- a/pkging/pkgtest/testdata/ref/go.mod +++ b/pkging/pkgtest/testdata/ref/go.mod @@ -2,6 +2,9 @@ module app go 1.13 -require github.com/markbates/pkger v0.0.0 +require ( + github.com/gobuffalo/buffalo v0.15.0 // indirect + github.com/markbates/pkger v0.0.0 +) replace github.com/markbates/pkger => ../../../../