frp/test/e2e/e2e_test.go

44 lines
983 B
Go
Raw Normal View History

2020-06-02 16:48:55 +02:00
package e2e
import (
"flag"
"fmt"
"os"
"testing"
2023-02-27 07:44:16 +01:00
_ "github.com/onsi/ginkgo/v2"
2020-09-07 08:57:23 +02:00
2022-08-28 19:02:53 +02:00
"github.com/fatedier/frp/pkg/util/log"
2020-09-07 08:57:23 +02:00
// test source
2022-08-28 19:02:53 +02:00
"github.com/fatedier/frp/test/e2e/framework"
2023-09-13 10:32:39 +02:00
_ "github.com/fatedier/frp/test/e2e/legacy/basic"
_ "github.com/fatedier/frp/test/e2e/legacy/features"
_ "github.com/fatedier/frp/test/e2e/legacy/plugin"
_ "github.com/fatedier/frp/test/e2e/v1/basic"
_ "github.com/fatedier/frp/test/e2e/v1/features"
_ "github.com/fatedier/frp/test/e2e/v1/plugin"
2020-06-02 16:48:55 +02:00
)
// handleFlags sets up all flags and parses the command line.
func handleFlags() {
framework.RegisterCommonFlags(flag.CommandLine)
flag.Parse()
}
func TestMain(m *testing.M) {
// Register test flags, then parse flags.
handleFlags()
if err := framework.ValidateTestContext(&framework.TestContext); err != nil {
fmt.Println(err)
os.Exit(1)
}
2024-03-12 06:58:53 +01:00
log.InitLogger("console", framework.TestContext.LogLevel, 0, true)
2020-06-02 16:48:55 +02:00
os.Exit(m.Run())
}
func TestE2E(t *testing.T) {
RunE2ETests(t)
}