diff options
Diffstat (limited to 'server/rpki_test.go')
-rw-r--r-- | server/rpki_test.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/server/rpki_test.go b/server/rpki_test.go index fb270cf7..c58ef32b 100644 --- a/server/rpki_test.go +++ b/server/rpki_test.go @@ -61,7 +61,7 @@ func validateOne(tree *radix.Tree, cidr, aspathStr string) config.RpkiValidation func TestValidate0(t *testing.T) { assert := assert.New(t) - manager, _ := NewROAManager(0, []config.RpkiServer{}) + manager, _ := NewROAManager(0) manager.addROA(NewROA(bgp.AFI_IP, net.ParseIP("192.168.0.0").To4(), 24, 32, 100, "")) manager.addROA(NewROA(bgp.AFI_IP, net.ParseIP("192.168.0.0").To4(), 24, 24, 200, "")) @@ -90,7 +90,7 @@ func TestValidate0(t *testing.T) { func TestValidate1(t *testing.T) { assert := assert.New(t) - manager, _ := NewROAManager(0, []config.RpkiServer{}) + manager, _ := NewROAManager(0) manager.addROA(NewROA(bgp.AFI_IP, net.ParseIP("10.0.0.0").To4(), 16, 16, 65000, "")) var r config.RpkiValidationResultType @@ -106,7 +106,7 @@ func TestValidate1(t *testing.T) { func TestValidate2(t *testing.T) { assert := assert.New(t) - manager, _ := NewROAManager(0, []config.RpkiServer{}) + manager, _ := NewROAManager(0) var r config.RpkiValidationResultType @@ -121,7 +121,7 @@ func TestValidate2(t *testing.T) { func TestValidate3(t *testing.T) { assert := assert.New(t) - manager, _ := NewROAManager(0, []config.RpkiServer{}) + manager, _ := NewROAManager(0) manager.addROA(NewROA(bgp.AFI_IP, net.ParseIP("10.0.0.0").To4(), 16, 16, 65000, "")) var r config.RpkiValidationResultType @@ -133,7 +133,7 @@ func TestValidate3(t *testing.T) { r = validateOne(tree, "10.0.0.0/17", "65000") assert.Equal(r, config.RPKI_VALIDATION_RESULT_TYPE_INVALID) - manager, _ = NewROAManager(0, []config.RpkiServer{}) + manager, _ = NewROAManager(0) manager.addROA(NewROA(bgp.AFI_IP, net.ParseIP("10.0.0.0").To4(), 16, 24, 65000, "")) tree = manager.Roas[bgp.RF_IPv4_UC] @@ -144,7 +144,7 @@ func TestValidate3(t *testing.T) { func TestValidate4(t *testing.T) { assert := assert.New(t) - manager, _ := NewROAManager(0, []config.RpkiServer{}) + manager, _ := NewROAManager(0) manager.addROA(NewROA(bgp.AFI_IP, net.ParseIP("10.0.0.0").To4(), 16, 16, 65000, "")) manager.addROA(NewROA(bgp.AFI_IP, net.ParseIP("10.0.0.0").To4(), 16, 16, 65001, "")) @@ -160,7 +160,7 @@ func TestValidate4(t *testing.T) { func TestValidate5(t *testing.T) { assert := assert.New(t) - manager, _ := NewROAManager(0, []config.RpkiServer{}) + manager, _ := NewROAManager(0) manager.addROA(NewROA(bgp.AFI_IP, net.ParseIP("10.0.0.0").To4(), 17, 17, 65000, "")) manager.addROA(NewROA(bgp.AFI_IP, net.ParseIP("10.0.128.0").To4(), 17, 17, 65000, "")) @@ -173,7 +173,7 @@ func TestValidate5(t *testing.T) { func TestValidate6(t *testing.T) { assert := assert.New(t) - manager, _ := NewROAManager(0, []config.RpkiServer{}) + manager, _ := NewROAManager(0) manager.addROA(NewROA(bgp.AFI_IP, net.ParseIP("10.0.0.0").To4(), 8, 32, 0, "")) var r config.RpkiValidationResultType @@ -191,7 +191,7 @@ func TestValidate6(t *testing.T) { func TestValidate7(t *testing.T) { assert := assert.New(t) - manager, _ := NewROAManager(0, []config.RpkiServer{}) + manager, _ := NewROAManager(0) manager.addROA(NewROA(bgp.AFI_IP, net.ParseIP("10.0.0.0").To4(), 16, 24, 65000, "")) var r config.RpkiValidationResultType @@ -209,7 +209,7 @@ func TestValidate7(t *testing.T) { func TestValidate8(t *testing.T) { assert := assert.New(t) - manager, _ := NewROAManager(0, []config.RpkiServer{}) + manager, _ := NewROAManager(0) manager.addROA(NewROA(bgp.AFI_IP, net.ParseIP("10.0.0.0").To4(), 16, 24, 0, "")) manager.addROA(NewROA(bgp.AFI_IP, net.ParseIP("10.0.0.0").To4(), 16, 24, 65000, "")) |