summaryrefslogtreecommitdiffhomepage
path: root/table/table_manager_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'table/table_manager_test.go')
-rw-r--r--table/table_manager_test.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/table/table_manager_test.go b/table/table_manager_test.go
index f0e465b2..e441fb97 100644
--- a/table/table_manager_test.go
+++ b/table/table_manager_test.go
@@ -30,7 +30,15 @@ import (
// this function processes only BGPUpdate
func (manager *TableManager) ProcessUpdate(fromPeer *PeerInfo, message *bgp.BGPMessage) ([]*Path, error) {
paths := ProcessMessage(message, fromPeer, time.Now())
- return manager.ProcessPaths(paths)
+ dsts := manager.ProcessPaths(paths)
+ paths2 := make([]*Path, 0, len(paths))
+ for _, dst := range dsts {
+ p := dst.NewFeed(GLOBAL_RIB_NAME)
+ if p != nil {
+ paths2 = append(paths2, p)
+ }
+ }
+ return paths2, nil
}
func getLogger(lv log.Level) *log.Logger {
@@ -2148,7 +2156,7 @@ func TestProcessBGPUpdate_Timestamp(t *testing.T) {
nlri := []*bgp.IPAddrPrefix{bgp.NewIPAddrPrefix(24, "10.10.10.0")}
- adjRib := NewAdjRib([]bgp.RouteFamily{bgp.RF_IPv4_UC, bgp.RF_IPv6_UC})
+ adjRib := NewAdjRib("test", []bgp.RouteFamily{bgp.RF_IPv4_UC, bgp.RF_IPv6_UC})
m1 := bgp.NewBGPUpdateMessage(nil, pathAttributes, nlri)
peer := peerR1()
pList1 := ProcessMessage(m1, peer, time.Now())