permission_suite_test.go 658 字节
package permission

import (
	"net/http"
	"net/http/httptest"
	"testing"

	"github.com/beego/beego/v2/server/web"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	_ "gitlab.fjmaimaimai.com/mmm-go-pp/partner01-gateway/pkg/infrastructure/pg"
	_ "gitlab.fjmaimaimai.com/mmm-go-pp/partner01-gateway/pkg/port/beego"
)

func TestPermission(t *testing.T) {
	RegisterFailHandler(Fail)
	RunSpecs(t, "Beego Port Permission Correlations Test Case Suite")
}

var handler http.Handler
var server *httptest.Server

var _ = BeforeSuite(func() {
	handler = web.BeeApp.Handlers
	server = httptest.NewServer(handler)
})

var _ = AfterSuite(func() {
	server.Close()
})