You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
//go:build e2e
|
|
|
|
// +build e2e
|
|
|
|
|
|
|
|
package e2e
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/onsi/ginkgo"
|
|
|
|
|
|
|
|
"mashibing.com/pkg/mashibing-deployment/test/framework"
|
|
|
|
)
|
|
|
|
|
|
|
|
var fmw = framework.NewFramework()
|
|
|
|
|
|
|
|
// 执行 go test 时候,会被先执行的内容
|
|
|
|
func TestMain(m *testing.M) {
|
|
|
|
fmw.Flags(). // 解析命令行
|
|
|
|
LoadConfig(ginkgo.GinkgoWriter). // 加载配置
|
|
|
|
SynchronizedBeforeSuite(nil). // 同步的,在执行测试任务之前执行的内容
|
|
|
|
SynchronizedAfterSuite(nil). // 同步的,在执行测试任务之后执行的内容
|
|
|
|
MRun(m) // 运行测试主函数
|
|
|
|
}
|
|
|
|
|
|
|
|
// 执行 go test 时候,会被后执行,也就是正常的测试用例
|
|
|
|
func TestE2E(t *testing.T) {
|
|
|
|
fmw.Run(t)
|
|
|
|
}
|