Fix various typos (#3783)

This commit is contained in:
Aarni Koskela
2023-11-22 08:30:22 +02:00
committed by GitHub
parent 526e809bd5
commit f5d5a00eef
19 changed files with 32 additions and 32 deletions

View File

@@ -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
}

View File

@@ -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 {

View File

@@ -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 {