@@ -10,7 +10,7 @@ import (
1010)
1111
1212func getAllocator (subnet * net.IPNet ) * Allocator {
13- a := NewAllocator ()
13+ a := NewAllocator (nil )
1414 a .AddSubnet ("default" , & SubnetInfo {Subnet : subnet })
1515 return a
1616}
@@ -58,7 +58,7 @@ func TestGetAddressVersion(t *testing.T) {
5858}
5959
6060func TestAddSubnets (t * testing.T ) {
61- a := NewAllocator ()
61+ a := NewAllocator (nil )
6262
6363 _ , sub0 , _ := net .ParseCIDR ("10.0.0.0/8" )
6464 err := a .AddSubnet ("default" , & SubnetInfo {Subnet : sub0 })
@@ -133,7 +133,7 @@ func TestAdjustAndCheckSubnet(t *testing.T) {
133133}
134134
135135func TestRemoveSubnet (t * testing.T ) {
136- a := NewAllocator ()
136+ a := NewAllocator (nil )
137137
138138 input := []struct {
139139 addrSpace AddressSpace
@@ -247,7 +247,7 @@ func TestGetAddress(t *testing.T) {
247247}
248248
249249func TestGetSubnetList (t * testing.T ) {
250- a := NewAllocator ()
250+ a := NewAllocator (nil )
251251 input := []struct {
252252 addrSpace AddressSpace
253253 subnet string
@@ -295,7 +295,7 @@ func TestGetSubnetList(t *testing.T) {
295295
296296func TestRequestSyntaxCheck (t * testing.T ) {
297297 var (
298- a = NewAllocator ()
298+ a = NewAllocator (nil )
299299 subnet = "192.168.0.0/16"
300300 addSpace = AddressSpace ("green" )
301301 )
@@ -462,7 +462,7 @@ func assertGetAddress(t *testing.T, subnet string) {
462462
463463 bm := & bitmask {
464464 subnet : sub ,
465- addressMask : bitseq .NewHandle ("default/192.168.0.0/24" , uint32 (numAddresses )),
465+ addressMask : bitseq .NewHandle ("ipam_test" , nil , " default/192.168.0.0/24" , uint32 (numAddresses )),
466466 freeAddresses : numAddresses ,
467467 }
468468 numBlocks := bm .addressMask .Head .Count
@@ -513,7 +513,7 @@ func assertNRequests(t *testing.T, subnet string, numReq int, lastExpectedIP str
513513func benchmarkRequest (subnet * net.IPNet ) {
514514 var err error
515515
516- a := NewAllocator ()
516+ a := NewAllocator (nil )
517517 a .internalHostSize = 20
518518 a .AddSubnet ("default" , & SubnetInfo {Subnet : subnet })
519519
0 commit comments