add e2e tests (#2334)

This commit is contained in:
fatedier
2021-03-31 16:57:39 +08:00
committed by GitHub
parent 9a849a29e9
commit fbaa5f866e
20 changed files with 541 additions and 166 deletions

View File

@@ -1,21 +1,38 @@
package consts
import (
"fmt"
"time"
"github.com/fatedier/frp/test/e2e/pkg/port"
)
const (
TestString = "frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet."
DefaultTimeout = 2 * time.Second
)
const (
PortServerName = "PortServer"
)
var (
PortServerName string
PortClientAdmin string
const (
DefaultServerConfig = `
[common]
bind_port = {{ .PortServer }}
bind_port = {{ .%s }}
log_level = trace
`
DefaultClientConfig = `
[common]
server_port = {{ .PortServer }}
server_port = {{ .%s }}
log_level = trace
`
)
func init() {
PortServerName = port.GenName("Server")
PortClientAdmin = port.GenName("ClientAdmin")
DefaultServerConfig = fmt.Sprintf(DefaultServerConfig, port.GenName("Server"))
DefaultClientConfig = fmt.Sprintf(DefaultClientConfig, port.GenName("Server"))
}