pkger/fs/memwh/warehouse_test.go

28 lines
409 B
Go
Raw Normal View History

2019-09-02 00:50:21 +03:00
package memwh
2019-09-01 00:00:24 +03:00
import (
2019-09-01 05:45:22 +03:00
"testing"
2019-09-01 00:00:24 +03:00
"github.com/markbates/pkger/fs/fstest"
"github.com/markbates/pkger/here"
2019-09-01 05:45:22 +03:00
"github.com/stretchr/testify/require"
2019-09-01 00:00:24 +03:00
)
2019-09-02 00:54:05 +03:00
func Test_Warehouse(t *testing.T) {
2019-09-01 05:45:22 +03:00
r := require.New(t)
info, err := here.Current()
r.NoError(err)
2019-09-01 06:29:25 +03:00
r.NotZero(info)
2019-09-01 05:45:22 +03:00
myfs, err := New(info)
r.NoError(err)
2019-09-01 06:29:25 +03:00
WithInfo(myfs, info)
2019-09-02 00:41:03 +03:00
suite, err := fstest.NewSuite(myfs)
2019-09-01 05:45:22 +03:00
r.NoError(err)
2019-09-01 00:00:24 +03:00
2019-09-01 05:45:22 +03:00
suite.Test(t)
2019-09-01 00:00:24 +03:00
}