vod_suite_test.go
578 字节
package vod
import (
"github.com/astaxie/beego"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
"net/http"
"net/http/httptest"
_ "openapi/pkg/port/beego"
"testing"
)
func TestPush(t *testing.T) {
gomega.RegisterFailHandler(ginkgo.Fail)
ginkgo.RunSpecs(t, "Beego Port Config Correlations Test Case Suite")
}
var handler http.Handler
var server *httptest.Server
var _ = ginkgo.BeforeSuite(func() {
handler = beego.BeeApp.Handlers
beego.BConfig.CopyRequestBody = true
server = httptest.NewServer(handler)
})
var _ = ginkgo.AfterSuite(func() {
server.Close()
})