From 756dd1ad5e8cad6b05c97133cf7722b3c76c64e7 Mon Sep 17 00:00:00 2001 From: fatedier Date: Sun, 28 May 2023 23:06:35 +0800 Subject: [PATCH] add e2e case for xtcp (#3451) --- hack/run-e2e.sh | 2 +- test/e2e/basic/basic.go | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/hack/run-e2e.sh b/hack/run-e2e.sh index ab59c11..e5dfecf 100755 --- a/hack/run-e2e.sh +++ b/hack/run-e2e.sh @@ -17,4 +17,4 @@ if [ x${LOG_LEVEL} != x"" ]; then logLevel=${LOG_LEVEL} fi -ginkgo -nodes=8 --poll-progress-after=20s ${ROOT}/test/e2e -- -frpc-path=${ROOT}/bin/frpc -frps-path=${ROOT}/bin/frps -log-level=${logLevel} -debug=${debug} +ginkgo -nodes=8 --poll-progress-after=30s ${ROOT}/test/e2e -- -frpc-path=${ROOT}/bin/frpc -frps-path=${ROOT}/bin/frps -log-level=${logLevel} -debug=${debug} diff --git a/test/e2e/basic/basic.go b/test/e2e/basic/basic.go index 7fd74e9..111e494 100644 --- a/test/e2e/basic/basic.go +++ b/test/e2e/basic/basic.go @@ -4,6 +4,7 @@ import ( "crypto/tls" "fmt" "strings" + "time" "github.com/onsi/ginkgo/v2" @@ -275,8 +276,8 @@ var _ = ginkgo.Describe("[Feature: Basic]", func() { }) }) - ginkgo.Describe("STCP && SUDP", func() { - types := []string{"stcp", "sudp"} + ginkgo.Describe("STCP && SUDP && XTCP", func() { + types := []string{"stcp", "sudp", "xtcp"} for _, t := range types { proxyType := t ginkgo.It(fmt.Sprintf("Expose echo server with %s", strings.ToUpper(proxyType)), func() { @@ -293,6 +294,9 @@ var _ = ginkgo.Describe("[Feature: Basic]", func() { case "sudp": localPortName = framework.UDPEchoServerPort protocol = "udp" + case "xtcp": + localPortName = framework.TCPEchoServerPort + protocol = "tcp" } correctSK := "abc" @@ -371,6 +375,9 @@ var _ = ginkgo.Describe("[Feature: Basic]", func() { for _, test := range tests { framework.NewRequestExpect(f). + RequestModify(func(r *request.Request) { + r.Timeout(5 * time.Second) + }). Protocol(protocol). PortName(test.bindPortName). Explain(test.proxyName).