diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-08-03 15:41:25 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-08-03 21:59:39 +0900 |
commit | cf23ecec82526d33a67cb101c4384839fea2f95f (patch) | |
tree | b27c10ff964902d41c8fdce81c5cadcf5ca64e52 /table/path_test.go | |
parent | 84dd9d6983564b37b7e146264c44da6874a08cf4 (diff) |
mrt: merge gomrt to gobgp cli command
Usage
$ gobgp mrt inject global <filename> [<count>]
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'table/path_test.go')
-rw-r--r-- | table/path_test.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/table/path_test.go b/table/path_test.go index d973294a..7fca310f 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(), pathP[0].getMedSetByTargetNeighbor(), time.Now()) + ipv4p := NewPath(pathP[0].GetSource(), pathP[0].GetNlri(), true, pathP[0].GetPathAttrs(), pathP[0].getMedSetByTargetNeighbor(), time.Now(), 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(), pathP[0].getMedSetByTargetNeighbor(), time.Now()) + ipv6p := NewPath(pathP[0].GetSource(), pathP[0].GetNlri(), true, pathP[0].GetPathAttrs(), pathP[0].getMedSetByTargetNeighbor(), time.Now(), false) assert.NotNil(t, ipv6p) } @@ -72,7 +72,7 @@ func TestPathCreatePath(t *testing.T) { nlriList := updateMsgP.NLRI pathAttributes := updateMsgP.PathAttributes nlri_info := nlriList[0] - path := NewPath(peerP[0], &nlri_info, false, pathAttributes, false, time.Now()) + path := NewPath(peerP[0], &nlri_info, false, pathAttributes, false, time.Now(), false) assert.NotNil(t, path) } @@ -118,7 +118,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, false, time.Now()) + p := NewPath(peer[0], &update.NLRI[0], false, update.PathAttributes, false, time.Now(), false) assert.Equal(10, p.GetAsPathLen()) } @@ -145,7 +145,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, false, time.Now()) + p := NewPath(peer[0], &update.NLRI[0], false, update.PathAttributes, false, time.Now(), false) p.PrependAsn(65000, 1) assert.Equal([]uint32{65000, 65001, 65002, 65003, 65004, 65005}, p.GetAsSeqList()) @@ -168,7 +168,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, false, time.Now()) + p := NewPath(peer[0], &update.NLRI[0], false, update.PathAttributes, false, time.Now(), false) asn := uint32(65000) p.PrependAsn(asn, 1) @@ -197,7 +197,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, false, time.Now()) + p := NewPath(peer[0], &update.NLRI[0], false, update.PathAttributes, false, time.Now(), false) asn := uint32(65000) p.PrependAsn(asn, 1) @@ -228,7 +228,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, false, time.Now()) + p := NewPath(peer[0], &update.NLRI[0], false, update.PathAttributes, false, time.Now(), false) asn := uint32(65000) p.PrependAsn(asn, 1) @@ -265,7 +265,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, false, time.Now()) + p := NewPath(peer[0], &update.NLRI[0], false, update.PathAttributes, false, time.Now(), false) expected := []uint32{65000, 65000} for _, v := range asns { @@ -294,7 +294,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, false, time.Now()) + pathP[i] = NewPath(peerP[i], &nlri_info, false, pathAttributes, false, time.Now(), false) } return pathP } |