support range ports mapping by go template (#4073)

This commit is contained in:
fatedier
2024-03-15 17:23:16 +08:00
committed by GitHub
parent 8383d528d9
commit 3585f5c0c0
10 changed files with 117 additions and 19 deletions

View File

@@ -8,7 +8,6 @@ import (
"github.com/onsi/ginkgo/v2"
clientsdk "github.com/fatedier/frp/pkg/sdk/client"
"github.com/fatedier/frp/test/e2e/framework"
"github.com/fatedier/frp/test/e2e/framework/consts"
"github.com/fatedier/frp/test/e2e/pkg/request"
@@ -54,7 +53,7 @@ var _ = ginkgo.Describe("[Feature: ClientManage]", func() {
framework.NewRequestExpect(f).Port(p2Port).Ensure()
framework.NewRequestExpect(f).Port(p3Port).Ensure()
client := clientsdk.New("127.0.0.1", adminPort)
client := f.APIClientForFrpc(adminPort)
conf, err := client.GetConfig()
framework.ExpectNoError(err)
@@ -120,7 +119,7 @@ var _ = ginkgo.Describe("[Feature: ClientManage]", func() {
framework.NewRequestExpect(f).Port(testPort).Ensure()
client := clientsdk.New("127.0.0.1", adminPort)
client := f.APIClientForFrpc(adminPort)
err := client.Stop()
framework.ExpectNoError(err)

View File

@@ -7,7 +7,6 @@ import (
"github.com/onsi/ginkgo/v2"
clientsdk "github.com/fatedier/frp/pkg/sdk/client"
"github.com/fatedier/frp/test/e2e/framework"
"github.com/fatedier/frp/test/e2e/framework/consts"
"github.com/fatedier/frp/test/e2e/pkg/port"
@@ -99,7 +98,7 @@ var _ = ginkgo.Describe("[Feature: Server Manager]", func() {
f.RunProcesses([]string{serverConf}, []string{clientConf})
client := clientsdk.New("127.0.0.1", adminPort)
client := f.APIClientForFrpc(adminPort)
// tcp random port
status, err := client.GetProxyStatus("tcp")