|
|
@ -4,6 +4,7 @@ import (
|
|
|
|
"crypto/tls"
|
|
|
|
"crypto/tls"
|
|
|
|
"fmt"
|
|
|
|
"fmt"
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/onsi/ginkgo/v2"
|
|
|
|
"github.com/onsi/ginkgo/v2"
|
|
|
|
|
|
|
|
|
|
|
@ -275,8 +276,8 @@ var _ = ginkgo.Describe("[Feature: Basic]", func() {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
ginkgo.Describe("STCP && SUDP", func() {
|
|
|
|
ginkgo.Describe("STCP && SUDP && XTCP", func() {
|
|
|
|
types := []string{"stcp", "sudp"}
|
|
|
|
types := []string{"stcp", "sudp", "xtcp"}
|
|
|
|
for _, t := range types {
|
|
|
|
for _, t := range types {
|
|
|
|
proxyType := t
|
|
|
|
proxyType := t
|
|
|
|
ginkgo.It(fmt.Sprintf("Expose echo server with %s", strings.ToUpper(proxyType)), func() {
|
|
|
|
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":
|
|
|
|
case "sudp":
|
|
|
|
localPortName = framework.UDPEchoServerPort
|
|
|
|
localPortName = framework.UDPEchoServerPort
|
|
|
|
protocol = "udp"
|
|
|
|
protocol = "udp"
|
|
|
|
|
|
|
|
case "xtcp":
|
|
|
|
|
|
|
|
localPortName = framework.TCPEchoServerPort
|
|
|
|
|
|
|
|
protocol = "tcp"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
correctSK := "abc"
|
|
|
|
correctSK := "abc"
|
|
|
@ -371,6 +375,9 @@ var _ = ginkgo.Describe("[Feature: Basic]", func() {
|
|
|
|
|
|
|
|
|
|
|
|
for _, test := range tests {
|
|
|
|
for _, test := range tests {
|
|
|
|
framework.NewRequestExpect(f).
|
|
|
|
framework.NewRequestExpect(f).
|
|
|
|
|
|
|
|
RequestModify(func(r *request.Request) {
|
|
|
|
|
|
|
|
r.Timeout(5 * time.Second)
|
|
|
|
|
|
|
|
}).
|
|
|
|
Protocol(protocol).
|
|
|
|
Protocol(protocol).
|
|
|
|
PortName(test.bindPortName).
|
|
|
|
PortName(test.bindPortName).
|
|
|
|
Explain(test.proxyName).
|
|
|
|
Explain(test.proxyName).
|
|
|
|