summaryrefslogtreecommitdiffhomepage
path: root/table/destination_test.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-12-19 15:56:43 -0800
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-12-20 03:41:07 -0800
commitb7771896ec4a4d739428c39190ad0166b87d4e00 (patch)
tree28d0bb1c2394b578dc620563bf3cae20ebbb5bbd /table/destination_test.go
parenta6bb09a8478be3914f58d7b5a78daa9128cc64b2 (diff)
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.
Diffstat (limited to 'table/destination_test.go')
-rw-r--r--table/destination_test.go10
1 files changed, 5 insertions, 5 deletions
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])