mirror of
https://github.com/fatedier/frp.git
synced 2026-01-11 22:23:12 +00:00
more e2e tests (#1845)
This commit is contained in:
@@ -4,12 +4,15 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/onsi/ginkgo/config"
|
||||
)
|
||||
|
||||
type TestContextType struct {
|
||||
FRPClientPath string
|
||||
FRPServerPath string
|
||||
LogLevel string
|
||||
Debug bool
|
||||
}
|
||||
|
||||
var TestContext TestContextType
|
||||
@@ -23,9 +26,16 @@ var TestContext TestContextType
|
||||
// regardless whether the test is actually in the test suite.
|
||||
//
|
||||
func RegisterCommonFlags(flags *flag.FlagSet) {
|
||||
// Turn on EmitSpecProgress to get spec progress (especially on interrupt)
|
||||
config.GinkgoConfig.EmitSpecProgress = true
|
||||
|
||||
// Randomize specs as well as suites
|
||||
config.GinkgoConfig.RandomizeAllSpecs = true
|
||||
|
||||
flags.StringVar(&TestContext.FRPClientPath, "frpc-path", "../../bin/frpc", "The frp client binary to use.")
|
||||
flags.StringVar(&TestContext.FRPServerPath, "frps-path", "../../bin/frps", "The frp server binary to use.")
|
||||
flags.StringVar(&TestContext.LogLevel, "log-level", "debug", "Log level.")
|
||||
flags.BoolVar(&TestContext.Debug, "debug", false, "Enable debug mode to print detail info.")
|
||||
}
|
||||
|
||||
func ValidateTestContext(t *TestContextType) error {
|
||||
|
||||
Reference in New Issue
Block a user