diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-09-23 12:06:21 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-09-25 18:17:06 +0900 |
commit | ca96672dc69d426bfcc94ca6d966e2bba556bdd1 (patch) | |
tree | 949de83be3dd59b0e9aaf6392cf2784532e9a0bc /table/table_manager_test.go | |
parent | 8adeda1ad84b61090f6f46509e8a0eef5e4fec77 (diff) |
server/table: assign mpls labels to locally generated vpn routes
Signed-off-by: ISHIDA Wataru <ishida.wataru@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 404ab553..122d60a1 100644 --- a/table/table_manager_test.go +++ b/table/table_manager_test.go @@ -69,7 +69,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("TestProcessBGPUpdate_0_select_onlypath_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}) + tm := NewTableManager("TestProcessBGPUpdate_0_select_onlypath_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) bgpMessage := update_fromR1() peer := peerR1() @@ -119,7 +119,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("TestProcessBGPUpdate_0_select_onlypath_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}) + tm := NewTableManager("TestProcessBGPUpdate_0_select_onlypath_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) bgpMessage := update_fromR1_ipv6() peer := peerR1() @@ -170,7 +170,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("TestProcessBGPUpdate_1_select_high_localpref_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}) + tm := NewTableManager("TestProcessBGPUpdate_1_select_high_localpref_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) var err error // low localpref message @@ -251,7 +251,7 @@ func TestProcessBGPUpdate_1_select_high_localpref_ipv4(t *testing.T) { func TestProcessBGPUpdate_1_select_high_localpref_ipv6(t *testing.T) { - tm := NewTableManager("TestProcessBGPUpdate_1_select_high_localpref_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}) + tm := NewTableManager("TestProcessBGPUpdate_1_select_high_localpref_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) var err error origin1 := bgp.NewPathAttributeOrigin(0) @@ -334,7 +334,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("TestProcessBGPUpdate_2_select_local_origin_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}) + tm := NewTableManager("TestProcessBGPUpdate_2_select_local_origin_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) var err error // low localpref message @@ -417,7 +417,7 @@ func TestProcessBGPUpdate_2_select_local_origin_ipv4(t *testing.T) { func TestProcessBGPUpdate_2_select_local_origin_ipv6(t *testing.T) { - tm := NewTableManager("TestProcessBGPUpdate_2_select_local_origin_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}) + tm := NewTableManager("TestProcessBGPUpdate_2_select_local_origin_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) var err error origin1 := bgp.NewPathAttributeOrigin(0) @@ -503,7 +503,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("TestProcessBGPUpdate_3_select_aspath_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}) + tm := NewTableManager("TestProcessBGPUpdate_3_select_aspath_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) var err error bgpMessage1 := update_fromR2viaR1() @@ -559,7 +559,7 @@ func TestProcessBGPUpdate_3_select_aspath_ipv4(t *testing.T) { func TestProcessBGPUpdate_3_select_aspath_ipv6(t *testing.T) { - tm := NewTableManager("TestProcessBGPUpdate_3_select_aspath_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}) + tm := NewTableManager("TestProcessBGPUpdate_3_select_aspath_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) var err error bgpMessage1 := update_fromR2viaR1_ipv6() @@ -617,7 +617,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("TestProcessBGPUpdate_4_select_low_origin_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}) + tm := NewTableManager("TestProcessBGPUpdate_4_select_low_origin_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) var err error // low origin message @@ -698,7 +698,7 @@ func TestProcessBGPUpdate_4_select_low_origin_ipv4(t *testing.T) { func TestProcessBGPUpdate_4_select_low_origin_ipv6(t *testing.T) { - tm := NewTableManager("TestProcessBGPUpdate_4_select_low_origin_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}) + tm := NewTableManager("TestProcessBGPUpdate_4_select_low_origin_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) var err error origin1 := bgp.NewPathAttributeOrigin(1) @@ -781,7 +781,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("TestProcessBGPUpdate_5_select_low_med_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}) + tm := NewTableManager("TestProcessBGPUpdate_5_select_low_med_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) var err error // low origin message @@ -862,7 +862,7 @@ func TestProcessBGPUpdate_5_select_low_med_ipv4(t *testing.T) { func TestProcessBGPUpdate_5_select_low_med_ipv6(t *testing.T) { - tm := NewTableManager("TestProcessBGPUpdate_5_select_low_med_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}) + tm := NewTableManager("TestProcessBGPUpdate_5_select_low_med_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) var err error origin1 := bgp.NewPathAttributeOrigin(0) @@ -945,7 +945,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("TestProcessBGPUpdate_6_select_ebgp_path_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}) + tm := NewTableManager("TestProcessBGPUpdate_6_select_ebgp_path_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) var err error @@ -1027,7 +1027,7 @@ func TestProcessBGPUpdate_6_select_ebgp_path_ipv4(t *testing.T) { func TestProcessBGPUpdate_6_select_ebgp_path_ipv6(t *testing.T) { - tm := NewTableManager("TestProcessBGPUpdate_6_select_ebgp_path_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}) + tm := NewTableManager("TestProcessBGPUpdate_6_select_ebgp_path_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) var err error origin1 := bgp.NewPathAttributeOrigin(0) @@ -1112,7 +1112,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("TestProcessBGPUpdate_7_select_low_routerid_path_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}) + tm := NewTableManager("TestProcessBGPUpdate_7_select_low_routerid_path_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) var err error @@ -1194,7 +1194,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("TestProcessBGPUpdate_7_select_low_routerid_path_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}) + tm := NewTableManager("TestProcessBGPUpdate_7_select_low_routerid_path_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) var err error origin1 := bgp.NewPathAttributeOrigin(0) @@ -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("TestProcessBGPUpdate_8_withdraw_path_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}) + tm := NewTableManager("TestProcessBGPUpdate_8_withdraw_path_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) //setLogger(getLogger(log.DebugLevel)) var err error @@ -1382,7 +1382,7 @@ func TestProcessBGPUpdate_8_withdraw_path_ipv4(t *testing.T) { // TODO MP_UNREACH func TestProcessBGPUpdate_8_mpunreach_path_ipv6(t *testing.T) { - tm := NewTableManager("TestProcessBGPUpdate_8_mpunreach_path_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}) + tm := NewTableManager("TestProcessBGPUpdate_8_mpunreach_path_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) var err error origin1 := bgp.NewPathAttributeOrigin(0) @@ -1511,7 +1511,7 @@ func TestProcessBGPUpdate_8_mpunreach_path_ipv6(t *testing.T) { // handle bestpath lost func TestProcessBGPUpdate_bestpath_lost_ipv4(t *testing.T) { - tm := NewTableManager("TestProcessBGPUpdate_bestpath_lost_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}) + tm := NewTableManager("TestProcessBGPUpdate_bestpath_lost_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) //setLogger(getLogger(log.DebugLevel)) var err error @@ -1583,7 +1583,7 @@ func TestProcessBGPUpdate_bestpath_lost_ipv4(t *testing.T) { func TestProcessBGPUpdate_bestpath_lost_ipv6(t *testing.T) { - tm := NewTableManager("TestProcessBGPUpdate_bestpath_lost_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}) + tm := NewTableManager("TestProcessBGPUpdate_bestpath_lost_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) var err error origin1 := bgp.NewPathAttributeOrigin(0) @@ -1655,7 +1655,7 @@ func TestProcessBGPUpdate_bestpath_lost_ipv6(t *testing.T) { // test: implicit withdrawal case func TestProcessBGPUpdate_implicit_withdrwal_ipv4(t *testing.T) { - tm := NewTableManager("TestProcessBGPUpdate_implicit_withdrwal_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}) + tm := NewTableManager("TestProcessBGPUpdate_implicit_withdrwal_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) //setLogger(getLogger(log.DebugLevel)) var err error @@ -1738,7 +1738,7 @@ func TestProcessBGPUpdate_implicit_withdrwal_ipv4(t *testing.T) { func TestProcessBGPUpdate_implicit_withdrwal_ipv6(t *testing.T) { - tm := NewTableManager("TestProcessBGPUpdate_implicit_withdrwal_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}) + tm := NewTableManager("TestProcessBGPUpdate_implicit_withdrwal_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) var err error origin1 := bgp.NewPathAttributeOrigin(0) @@ -1846,7 +1846,7 @@ func TestProcessBGPUpdate_implicit_withdrwal_ipv6(t *testing.T) { // check multiple paths func TestProcessBGPUpdate_multiple_nlri_ipv4(t *testing.T) { - tm := NewTableManager("TestProcessBGPUpdate_multiple_nlri_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}) + tm := NewTableManager("TestProcessBGPUpdate_multiple_nlri_ipv4", []bgp.RouteFamily{bgp.RF_IPv4_UC}, 0, 0) //setLogger(getLogger(log.DebugLevel)) var err error @@ -1981,7 +1981,7 @@ func TestProcessBGPUpdate_multiple_nlri_ipv4(t *testing.T) { // check multiple paths func TestProcessBGPUpdate_multiple_nlri_ipv6(t *testing.T) { - tm := NewTableManager("TestProcessBGPUpdate_multiple_nlri_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}) + tm := NewTableManager("TestProcessBGPUpdate_multiple_nlri_ipv6", []bgp.RouteFamily{bgp.RF_IPv6_UC}, 0, 0) //setLogger(getLogger(log.DebugLevel)) var err error |