2019-11-01 00:20:15 +03:00
|
|
|
package stdos
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
|
2019-11-01 23:08:10 +03:00
|
|
|
"github.com/markbates/pkger/pkging/pkgtest"
|
2019-11-01 00:20:15 +03:00
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
)
|
|
|
|
|
|
|
|
func Test_Pkger_HTTP(t *testing.T) {
|
|
|
|
r := require.New(t)
|
|
|
|
|
2019-11-01 23:08:10 +03:00
|
|
|
ref, err := pkgtest.NewRef()
|
2019-11-01 00:20:15 +03:00
|
|
|
r.NoError(err)
|
|
|
|
defer os.RemoveAll(ref.Dir)
|
|
|
|
|
|
|
|
pkg, err := New(ref.Info)
|
|
|
|
r.NoError(err)
|
|
|
|
|
2019-11-01 23:08:10 +03:00
|
|
|
pkgtest.HTTPTest(t, ref, pkg)
|
2019-11-01 00:20:15 +03:00
|
|
|
}
|