diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-11-29 04:08:36 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-12-08 14:45:37 +0900 |
commit | a719a3de6e8b2bb7803e02e7e05ea8e854d6f396 (patch) | |
tree | fbe41ae4055542414a7a02d81c87a0fc57b65f5c /table/destination_test.go | |
parent | 3213eed6a5aca1625ffa03ab410ffc587121b9da (diff) |
server/table: use only one rib for multiple route server clients
speed up and reduce memory footprint
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'table/destination_test.go')
-rw-r--r-- | table/destination_test.go | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/table/destination_test.go b/table/destination_test.go index dce14250..105d7104 100644 --- a/table/destination_test.go +++ b/table/destination_test.go @@ -63,49 +63,6 @@ func TestDestinationGetNlri(t *testing.T) { r_nlri := dd.GetNlri() assert.Equal(t, r_nlri, nlri) } -func TestDestinationSetBestPathReason(t *testing.T) { - dd := &Destination{} - reason := BestPathReason("reason1") - dd.setBestPathReason(reason) - r_reason := dd.getBestPathReason() - assert.Equal(t, r_reason, reason) -} -func TestDestinationGetBestPathReason(t *testing.T) { - dd := &Destination{} - reason := BestPathReason("reason2") - dd.setBestPathReason(reason) - r_reason := dd.getBestPathReason() - assert.Equal(t, r_reason, reason) -} -func TestDestinationSetBestPath(t *testing.T) { - peerD := DestCreatePeer() - pathD := DestCreatePath(peerD) - ipv4d := NewDestination(pathD[0].GetNlri()) - ipv4d.setBestPath(pathD[0]) - r_pathD := ipv4d.GetBestPath() - assert.Equal(t, r_pathD, pathD[0]) -} -func TestDestinationGetBestPath(t *testing.T) { - peerD := DestCreatePeer() - pathD := DestCreatePath(peerD) - ipv4d := NewDestination(pathD[0].GetNlri()) - ipv4d.setBestPath(pathD[0]) - r_pathD := ipv4d.GetBestPath() - assert.Equal(t, r_pathD, pathD[0]) -} -func TestDestinationCalculate(t *testing.T) { - peerD := DestCreatePeer() - pathD := DestCreatePath(peerD) - ipv4d := NewDestination(pathD[0].GetNlri()) - //best path selection - ipv4d.addNewPath(pathD[0]) - ipv4d.addNewPath(pathD[1]) - ipv4d.addNewPath(pathD[2]) - ipv4d.addWithdraw(pathD[2]) - _, _, e := ipv4d.Calculate() - assert.Nil(t, e) -} - func DestCreatePeer() []*PeerInfo { peerD1 := &PeerInfo{AS: 65000} peerD2 := &PeerInfo{AS: 65001} |