somebody take me

This commit is contained in:
Mark Bates 2019-09-01 18:05:54 -04:00
parent 3d94a20bbf
commit f83c92f3e9
4 changed files with 4 additions and 46 deletions

View File

@ -15,12 +15,12 @@ func Test_Warehouse(t *testing.T) {
r.NoError(err)
r.NotZero(info)
mypkging, err := New(info)
wh, err := New(info)
r.NoError(err)
WithInfo(mypkging, info)
WithInfo(wh, info)
suite, err := waretest.NewSuite(mypkging)
suite, err := waretest.NewSuite(wh)
r.NoError(err)
suite.Test(t)

View File

@ -1,12 +0,0 @@
package waretest
import (
"github.com/markbates/pkger/pkging"
)
type TestFile struct {
Name string
Path pkging.Path
}
type TestFiles map[pkging.Path]TestFile

View File

@ -1,31 +0,0 @@
package waretest
import (
"github.com/markbates/pkger/pkging"
)
func Files(fx pkging.Warehouse) (TestFiles, error) {
tf := TestFiles{}
for _, f := range fileList {
pt, err := fx.Parse(f)
if err != nil {
return tf, err
}
tf[pt] = TestFile{
Name: pt.Name,
Path: pt,
}
}
return tf, nil
}
var fileList = []string{
"/main.go",
"/go.mod",
"/go.sum",
"/public/index.html",
"/public/images/mark.png",
"/templates/a.txt",
"/templates/b/b.txt",
}

View File

@ -0,0 +1 @@
package waretest