From b67befc30abb79bd6c70fbb96437ae6e90cfb274 Mon Sep 17 00:00:00 2001 From: Naoto Hanaue Date: Wed, 17 Feb 2016 11:13:46 +0900 Subject: ops: maintenance of two-way route exchange --- table/path_test.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'table/path_test.go') diff --git a/table/path_test.go b/table/path_test.go index bcc532a1..6c71cc05 100644 --- a/table/path_test.go +++ b/table/path_test.go @@ -14,13 +14,13 @@ import ( func TestPathNewIPv4(t *testing.T) { peerP := PathCreatePeer() pathP := PathCreatePath(peerP) - ipv4p := NewPath(pathP[0].GetSource(), pathP[0].GetNlri(), true, pathP[0].GetPathAttrs(), time.Now(), false) + ipv4p := NewPath(pathP[0].GetSource(), pathP[0].GetNlri(), true, pathP[0].GetPathAttrs(), time.Now(), false, false) assert.NotNil(t, ipv4p) } func TestPathNewIPv6(t *testing.T) { peerP := PathCreatePeer() pathP := PathCreatePath(peerP) - ipv6p := NewPath(pathP[0].GetSource(), pathP[0].GetNlri(), true, pathP[0].GetPathAttrs(), time.Now(), false) + ipv6p := NewPath(pathP[0].GetSource(), pathP[0].GetNlri(), true, pathP[0].GetPathAttrs(), time.Now(), false, false) assert.NotNil(t, ipv6p) } @@ -42,7 +42,7 @@ func TestPathCreatePath(t *testing.T) { nlriList := updateMsgP.NLRI pathAttributes := updateMsgP.PathAttributes nlri_info := nlriList[0] - path := NewPath(peerP[0], nlri_info, false, pathAttributes, time.Now(), false) + path := NewPath(peerP[0], nlri_info, false, pathAttributes, time.Now(), false, false) assert.NotNil(t, path) } @@ -87,7 +87,7 @@ func TestASPathLen(t *testing.T) { update := bgpmsg.Body.(*bgp.BGPUpdate) UpdatePathAttrs4ByteAs(update) peer := PathCreatePeer() - p := NewPath(peer[0], update.NLRI[0], false, update.PathAttributes, time.Now(), false) + p := NewPath(peer[0], update.NLRI[0], false, update.PathAttributes, time.Now(), false, false) assert.Equal(10, p.GetAsPathLen()) } @@ -113,7 +113,7 @@ func TestPathPrependAsnToExistingSeqAttr(t *testing.T) { update := bgpmsg.Body.(*bgp.BGPUpdate) UpdatePathAttrs4ByteAs(update) peer := PathCreatePeer() - p := NewPath(peer[0], update.NLRI[0], false, update.PathAttributes, time.Now(), false) + p := NewPath(peer[0], update.NLRI[0], false, update.PathAttributes, time.Now(), false, false) p.PrependAsn(65000, 1) assert.Equal([]uint32{65000, 65001, 65002, 65003, 65004, 65005, 0, 0, 0}, p.GetAsSeqList()) @@ -135,7 +135,7 @@ func TestPathPrependAsnToNewAsPathAttr(t *testing.T) { update := bgpmsg.Body.(*bgp.BGPUpdate) UpdatePathAttrs4ByteAs(update) peer := PathCreatePeer() - p := NewPath(peer[0], update.NLRI[0], false, update.PathAttributes, time.Now(), false) + p := NewPath(peer[0], update.NLRI[0], false, update.PathAttributes, time.Now(), false, false) asn := uint32(65000) p.PrependAsn(asn, 1) @@ -163,7 +163,7 @@ func TestPathPrependAsnToNewAsPathSeq(t *testing.T) { update := bgpmsg.Body.(*bgp.BGPUpdate) UpdatePathAttrs4ByteAs(update) peer := PathCreatePeer() - p := NewPath(peer[0], update.NLRI[0], false, update.PathAttributes, time.Now(), false) + p := NewPath(peer[0], update.NLRI[0], false, update.PathAttributes, time.Now(), false, false) asn := uint32(65000) p.PrependAsn(asn, 1) @@ -193,7 +193,7 @@ func TestPathPrependAsnToEmptyAsPathAttr(t *testing.T) { update := bgpmsg.Body.(*bgp.BGPUpdate) UpdatePathAttrs4ByteAs(update) peer := PathCreatePeer() - p := NewPath(peer[0], update.NLRI[0], false, update.PathAttributes, time.Now(), false) + p := NewPath(peer[0], update.NLRI[0], false, update.PathAttributes, time.Now(), false, false) asn := uint32(65000) p.PrependAsn(asn, 1) @@ -229,7 +229,7 @@ func TestPathPrependAsnToFullPathAttr(t *testing.T) { update := bgpmsg.Body.(*bgp.BGPUpdate) UpdatePathAttrs4ByteAs(update) peer := PathCreatePeer() - p := NewPath(peer[0], update.NLRI[0], false, update.PathAttributes, time.Now(), false) + p := NewPath(peer[0], update.NLRI[0], false, update.PathAttributes, time.Now(), false, false) expected := []uint32{65000, 65000} for _, v := range asns { @@ -258,7 +258,7 @@ func PathCreatePath(peerP []*PeerInfo) []*Path { nlriList := updateMsgP.NLRI pathAttributes := updateMsgP.PathAttributes nlri_info := nlriList[0] - pathP[i] = NewPath(peerP[i], nlri_info, false, pathAttributes, time.Now(), false) + pathP[i] = NewPath(peerP[i], nlri_info, false, pathAttributes, time.Now(), false, false) } return pathP } -- cgit v1.2.3