device_collection_suite_test.go 797 字节
package device_collection

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/allied-creation/allied-creation-manufacture/pkg/application"
	_ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/infrastructure/pg"
	_ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/port/beego"
)

func TestDeviceCollection(t *testing.T) {
	RegisterFailHandler(Fail)
	RunSpecs(t, "Beego Port DeviceCollection 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()
})