Skip to content

Commit

Permalink
add e2e case for xtcp (fatedier#3451)
Browse files Browse the repository at this point in the history
  • Loading branch information
fatedier authored May 28, 2023
1 parent c71efde commit 756dd1a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hack/run-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
11 changes: 9 additions & 2 deletions test/e2e/basic/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"crypto/tls"
"fmt"
"strings"
"time"

"github.com/onsi/ginkgo/v2"

Expand Down Expand Up @@ -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() {
Expand All @@ -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"
Expand Down Expand Up @@ -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).
Expand Down

0 comments on commit 756dd1a

Please sign in to comment.