mirror of
https://github.com/fatedier/frp.git
synced 2025-07-27 07:35:07 +00:00
Fix various typos (#3783)
This commit is contained in:
@@ -29,8 +29,8 @@ type Framework struct {
|
||||
// ports used in this framework indexed by port name.
|
||||
usedPorts map[string]int
|
||||
|
||||
// record ports alloced by this framework and release them after each test
|
||||
allocedPorts []int
|
||||
// record ports allocated by this framework and release them after each test
|
||||
allocatedPorts []int
|
||||
|
||||
// portAllocator to alloc port for this test case.
|
||||
portAllocator *port.Allocator
|
||||
@@ -153,11 +153,11 @@ func (f *Framework) AfterEach() {
|
||||
}
|
||||
f.usedPorts = make(map[string]int)
|
||||
|
||||
// release alloced ports
|
||||
for _, port := range f.allocedPorts {
|
||||
// release allocated ports
|
||||
for _, port := range f.allocatedPorts {
|
||||
f.portAllocator.Release(port)
|
||||
}
|
||||
f.allocedPorts = make([]int, 0)
|
||||
f.allocatedPorts = make([]int, 0)
|
||||
|
||||
// clear os envs
|
||||
f.osEnvs = make([]string, 0)
|
||||
@@ -237,7 +237,7 @@ func (f *Framework) PortByName(name string) int {
|
||||
func (f *Framework) AllocPort() int {
|
||||
port := f.portAllocator.Get()
|
||||
ExpectTrue(port > 0, "alloc port failed")
|
||||
f.allocedPorts = append(f.allocedPorts, port)
|
||||
f.allocatedPorts = append(f.allocatedPorts, port)
|
||||
return port
|
||||
}
|
||||
|
||||
|
@@ -124,7 +124,7 @@ var _ = ginkgo.Describe("[Feature: Server-Plugins]", func() {
|
||||
framework.NewRequestExpect(f).Port(remotePort).Ensure()
|
||||
})
|
||||
|
||||
ginkgo.It("Mofify RemotePort", func() {
|
||||
ginkgo.It("Modify RemotePort", func() {
|
||||
localPort := f.AllocPort()
|
||||
remotePort := f.AllocPort()
|
||||
handler := func(req *plugin.Request) *plugin.Response {
|
||||
|
@@ -129,7 +129,7 @@ var _ = ginkgo.Describe("[Feature: Server-Plugins]", func() {
|
||||
framework.NewRequestExpect(f).Port(remotePort).Ensure()
|
||||
})
|
||||
|
||||
ginkgo.It("Mofify RemotePort", func() {
|
||||
ginkgo.It("Modify RemotePort", func() {
|
||||
localPort := f.AllocPort()
|
||||
remotePort := f.AllocPort()
|
||||
handler := func(req *plugin.Request) *plugin.Response {
|
||||
|
Reference in New Issue
Block a user