From b7771896ec4a4d739428c39190ad0166b87d4e00 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Fri, 19 Dec 2014 15:56:43 -0800 Subject: table: export getNlri method in Path peer codes need it. Also remove putNlri() because NLRI is unlikely changed after path creation because NLRI is used as sorta key value for path. --- table/destination_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'table/destination_test.go') diff --git a/table/destination_test.go b/table/destination_test.go index 7584ae47..29534c04 100644 --- a/table/destination_test.go +++ b/table/destination_test.go @@ -27,14 +27,14 @@ func TestDestinationNewIPv4(t *testing.T) { peerD := DestCreatePeer() msgD := DestCreateMSG(peerD) pathD := DestCreatePath(msgD) - ipv4d := NewIPv4Destination(pathD[0].getNlri()) + ipv4d := NewIPv4Destination(pathD[0].GetNlri()) assert.NotNil(t, ipv4d) } func TestDestinationNewIPv6(t *testing.T) { peerD := DestCreatePeer() msgD := DestCreateMSG(peerD) pathD := DestCreatePath(msgD) - ipv6d := NewIPv6Destination(pathD[0].getNlri()) + ipv6d := NewIPv6Destination(pathD[0].GetNlri()) assert.NotNil(t, ipv6d) } @@ -82,7 +82,7 @@ func TestDestinationSetBestPath(t *testing.T) { peerD := DestCreatePeer() msgD := DestCreateMSG(peerD) pathD := DestCreatePath(msgD) - ipv4d := NewIPv4Destination(pathD[0].getNlri()) + ipv4d := NewIPv4Destination(pathD[0].GetNlri()) ipv4d.setBestPath(pathD[0]) r_pathD := ipv4d.getBestPath() assert.Equal(t, r_pathD, pathD[0]) @@ -91,7 +91,7 @@ func TestDestinationGetBestPath(t *testing.T) { peerD := DestCreatePeer() msgD := DestCreateMSG(peerD) pathD := DestCreatePath(msgD) - ipv4d := NewIPv4Destination(pathD[0].getNlri()) + ipv4d := NewIPv4Destination(pathD[0].GetNlri()) ipv4d.setBestPath(pathD[0]) r_pathD := ipv4d.getBestPath() assert.Equal(t, r_pathD, pathD[0]) @@ -100,7 +100,7 @@ func TestDestinationCalculate(t *testing.T) { peerD := DestCreatePeer() msgD := DestCreateMSG(peerD) pathD := DestCreatePath(msgD) - ipv4d := NewIPv4Destination(pathD[0].getNlri()) + ipv4d := NewIPv4Destination(pathD[0].GetNlri()) //best path selection ipv4d.addNewPath(pathD[0]) ipv4d.addNewPath(pathD[1]) -- cgit v1.2.3