diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-11-02 00:03:41 -0700 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-11-03 02:49:59 -0700 |
commit | be9918a163a20a7a885dc9206a733d983ee76b3a (patch) | |
tree | c73975d94321a1a02429fb6ad0d3e0373c3f4813 /table/table_manager_test.go | |
parent | c7653aa9d4276098a7a6b5ade5ffce5bf5d089e8 (diff) |
remove label allocation completely
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/table_manager_test.go')
-rw-r--r-- | table/table_manager_test.go | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/table/table_manager_test.go b/table/table_manager_test.go index f86bfd05..21d15026 100644 --- a/table/table_manager_test.go +++ b/table/table_manager_test.go @@ -84,7 +84,7 @@ func peerR3() *PeerInfo { // test best path calculation and check the result path is from R1 func TestProcessBGPUpdate_0_select_onlypath_ipv4(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}) bgpMessage := update_fromR1() peer := peerR1() @@ -134,7 +134,7 @@ func TestProcessBGPUpdate_0_select_onlypath_ipv4(t *testing.T) { // test best path calculation and check the result path is from R1 func TestProcessBGPUpdate_0_select_onlypath_ipv6(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}) bgpMessage := update_fromR1_ipv6() peer := peerR1() @@ -185,7 +185,7 @@ func TestProcessBGPUpdate_0_select_onlypath_ipv6(t *testing.T) { // test: compare localpref func TestProcessBGPUpdate_1_select_high_localpref_ipv4(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}) // low localpref message origin1 := bgp.NewPathAttributeOrigin(0) @@ -265,7 +265,7 @@ func TestProcessBGPUpdate_1_select_high_localpref_ipv4(t *testing.T) { func TestProcessBGPUpdate_1_select_high_localpref_ipv6(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}) origin1 := bgp.NewPathAttributeOrigin(0) aspath1 := createAsPathAttribute([]uint32{65000}) @@ -347,7 +347,7 @@ func TestProcessBGPUpdate_1_select_high_localpref_ipv6(t *testing.T) { // test: compare localOrigin func TestProcessBGPUpdate_2_select_local_origin_ipv4(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}) // low localpref message origin1 := bgp.NewPathAttributeOrigin(0) @@ -429,7 +429,7 @@ func TestProcessBGPUpdate_2_select_local_origin_ipv4(t *testing.T) { func TestProcessBGPUpdate_2_select_local_origin_ipv6(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}) origin1 := bgp.NewPathAttributeOrigin(0) aspath1 := createAsPathAttribute([]uint32{65000}) @@ -514,7 +514,7 @@ func TestProcessBGPUpdate_2_select_local_origin_ipv6(t *testing.T) { // test: compare AS_PATH func TestProcessBGPUpdate_3_select_aspath_ipv4(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}) bgpMessage1 := update_fromR2viaR1() peer1 := peerR1() @@ -569,7 +569,7 @@ func TestProcessBGPUpdate_3_select_aspath_ipv4(t *testing.T) { func TestProcessBGPUpdate_3_select_aspath_ipv6(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}) bgpMessage1 := update_fromR2viaR1_ipv6() peer1 := peerR1() @@ -626,7 +626,7 @@ func TestProcessBGPUpdate_3_select_aspath_ipv6(t *testing.T) { // test: compare Origin func TestProcessBGPUpdate_4_select_low_origin_ipv4(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}) // low origin message origin1 := bgp.NewPathAttributeOrigin(1) @@ -706,7 +706,7 @@ func TestProcessBGPUpdate_4_select_low_origin_ipv4(t *testing.T) { func TestProcessBGPUpdate_4_select_low_origin_ipv6(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}) origin1 := bgp.NewPathAttributeOrigin(1) aspath1 := createAsPathAttribute([]uint32{65200, 65000}) @@ -788,7 +788,7 @@ func TestProcessBGPUpdate_4_select_low_origin_ipv6(t *testing.T) { // test: compare MED func TestProcessBGPUpdate_5_select_low_med_ipv4(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}) // low origin message origin1 := bgp.NewPathAttributeOrigin(0) @@ -868,7 +868,7 @@ func TestProcessBGPUpdate_5_select_low_med_ipv4(t *testing.T) { func TestProcessBGPUpdate_5_select_low_med_ipv6(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}) origin1 := bgp.NewPathAttributeOrigin(0) aspath1 := createAsPathAttribute([]uint32{65200, 65000}) @@ -950,7 +950,7 @@ func TestProcessBGPUpdate_5_select_low_med_ipv6(t *testing.T) { // test: compare AS_NUMBER(prefer eBGP path) func TestProcessBGPUpdate_6_select_ebgp_path_ipv4(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}) // low origin message origin1 := bgp.NewPathAttributeOrigin(0) @@ -1030,7 +1030,7 @@ func TestProcessBGPUpdate_6_select_ebgp_path_ipv4(t *testing.T) { func TestProcessBGPUpdate_6_select_ebgp_path_ipv6(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}) origin1 := bgp.NewPathAttributeOrigin(0) aspath1 := createAsPathAttribute([]uint32{65000, 65200}) @@ -1114,7 +1114,7 @@ func TestProcessBGPUpdate_6_select_ebgp_path_ipv6(t *testing.T) { // test: compare Router ID func TestProcessBGPUpdate_7_select_low_routerid_path_ipv4(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}) SelectionOptions.ExternalCompareRouterId = true // low origin message @@ -1195,7 +1195,7 @@ func TestProcessBGPUpdate_7_select_low_routerid_path_ipv4(t *testing.T) { func TestProcessBGPUpdate_7_select_low_routerid_path_ipv6(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}) origin1 := bgp.NewPathAttributeOrigin(0) aspath1 := createAsPathAttribute([]uint32{65000, 65200}) @@ -1277,7 +1277,7 @@ func TestProcessBGPUpdate_7_select_low_routerid_path_ipv6(t *testing.T) { // test: withdraw and mpunreach path func TestProcessBGPUpdate_8_withdraw_path_ipv4(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}) // path1 origin1 := bgp.NewPathAttributeOrigin(0) @@ -1380,7 +1380,7 @@ func TestProcessBGPUpdate_8_withdraw_path_ipv4(t *testing.T) { // TODO MP_UNREACH func TestProcessBGPUpdate_8_mpunreach_path_ipv6(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}) origin1 := bgp.NewPathAttributeOrigin(0) aspath1 := createAsPathAttribute([]uint32{65000}) @@ -1508,7 +1508,7 @@ func TestProcessBGPUpdate_8_mpunreach_path_ipv6(t *testing.T) { // handle bestpath lost func TestProcessBGPUpdate_bestpath_lost_ipv4(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}) // path1 origin1 := bgp.NewPathAttributeOrigin(0) @@ -1578,7 +1578,7 @@ func TestProcessBGPUpdate_bestpath_lost_ipv4(t *testing.T) { func TestProcessBGPUpdate_bestpath_lost_ipv6(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}) origin1 := bgp.NewPathAttributeOrigin(0) aspath1 := createAsPathAttribute([]uint32{65000}) @@ -1649,7 +1649,7 @@ func TestProcessBGPUpdate_bestpath_lost_ipv6(t *testing.T) { // test: implicit withdrawal case func TestProcessBGPUpdate_implicit_withdrwal_ipv4(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}) // path1 origin1 := bgp.NewPathAttributeOrigin(0) @@ -1730,7 +1730,7 @@ func TestProcessBGPUpdate_implicit_withdrwal_ipv4(t *testing.T) { func TestProcessBGPUpdate_implicit_withdrwal_ipv6(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}) origin1 := bgp.NewPathAttributeOrigin(0) aspath1 := createAsPathAttribute([]uint32{65000, 65100, 65200}) @@ -1837,7 +1837,7 @@ func TestProcessBGPUpdate_implicit_withdrwal_ipv6(t *testing.T) { // check multiple paths func TestProcessBGPUpdate_multiple_nlri_ipv4(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv4_UC}) createPathAttr := func(aspaths []uint32, nh string) []bgp.PathAttributeInterface { origin := bgp.NewPathAttributeOrigin(0) @@ -1970,7 +1970,7 @@ func TestProcessBGPUpdate_multiple_nlri_ipv4(t *testing.T) { // check multiple paths func TestProcessBGPUpdate_multiple_nlri_ipv6(t *testing.T) { - tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) + tm := NewTableManager([]bgp.RouteFamily{bgp.RF_IPv6_UC}) createPathAttr := func(aspaths []uint32) []bgp.PathAttributeInterface { origin := bgp.NewPathAttributeOrigin(0) |