pkger/pkging/memware/warehouse_test.go

28 lines
431 B
Go
Raw Normal View History

2019-09-02 00:58:20 +03:00
package memware
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/here"
2019-09-02 01:02:45 +03:00
"github.com/markbates/pkger/pkging/waretest"
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
2019-09-02 01:02:45 +03:00
mypkging, err := New(info)
2019-09-01 05:45:22 +03:00
r.NoError(err)
2019-09-02 01:02:45 +03:00
WithInfo(mypkging, info)
2019-09-01 06:29:25 +03:00
2019-09-02 01:02:45 +03:00
suite, err := waretest.NewSuite(mypkging)
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
}