diff options
author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-09-12 23:13:44 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-09-17 21:11:05 +0900 |
commit | 589fdea311c69ad92f9ded519a0f8c99320a47dc (patch) | |
tree | e41b67248118b142da0b617f1057e8ef1021196d /internal/pkg/table/adj_test.go | |
parent | 21093fbc8739d0a8e4f84ec6e52c98dad0894612 (diff) |
table: implement adj-in table use routing table structures
rib and adj-in use the same data strcutures. Needs more clean up.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Diffstat (limited to 'internal/pkg/table/adj_test.go')
-rw-r--r-- | internal/pkg/table/adj_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/pkg/table/adj_test.go b/internal/pkg/table/adj_test.go index ac4fc5a0..d4c892cf 100644 --- a/internal/pkg/table/adj_test.go +++ b/internal/pkg/table/adj_test.go @@ -39,14 +39,14 @@ func TestStaleAll(t *testing.T) { adj := NewAdjRib(families) adj.Update([]*Path{p1, p2}) - assert.Equal(t, len(adj.table[family]), 2) + assert.Equal(t, adj.Count([]bgp.RouteFamily{family}), 2) adj.StaleAll(families) - for _, p := range adj.table[family] { + for _, p := range adj.PathList([]bgp.RouteFamily{family}, false) { assert.True(t, p.IsStale()) } adj.DropStale(families) - assert.Equal(t, len(adj.table[family]), 0) + assert.Equal(t, adj.Count([]bgp.RouteFamily{family}), 0) } |