mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 15:05:20 +00:00
Use networking to hold network related pkgs
Change names of unclear methods Use net as pkg name for short
This commit is contained in:
@@ -20,11 +20,11 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"k8s.io/kubernetes/pkg/util"
|
||||
"k8s.io/kubernetes/pkg/util/net"
|
||||
)
|
||||
|
||||
func TestRangeAllocatorEmpty(t *testing.T) {
|
||||
r := &util.PortRange{}
|
||||
r := &net.PortRange{}
|
||||
r.Set("0-0")
|
||||
defer func() {
|
||||
if rv := recover(); rv == nil {
|
||||
@@ -35,7 +35,7 @@ func TestRangeAllocatorEmpty(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRangeAllocatorFullyAllocated(t *testing.T) {
|
||||
r := &util.PortRange{}
|
||||
r := &net.PortRange{}
|
||||
r.Set("1-1")
|
||||
a := newPortRangeAllocator(*r)
|
||||
p, err := a.AllocateNext()
|
||||
@@ -67,7 +67,7 @@ func TestRangeAllocatorFullyAllocated(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRangeAllocator_RandomishAllocation(t *testing.T) {
|
||||
r := &util.PortRange{}
|
||||
r := &net.PortRange{}
|
||||
r.Set("1-100")
|
||||
a := newPortRangeAllocator(*r)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user