diff options
author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-10-21 21:39:34 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-10-25 07:50:06 +0900 |
commit | a2a72e336c2cb5089620cda602c1cc08a3f08bdc (patch) | |
tree | 2e8f9a4557d52231e48decf0f1260fd9133f9e6a /internal/pkg/table/adj_test.go | |
parent | 70bf80ac3afe8cbc25623c62855d34c6df0c9c72 (diff) |
table: remove unnecessary code in UpdateAdjRibOut()
There is no duplication of local id in the rib.
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 99aba0ff..bb1f07b9 100644 --- a/internal/pkg/table/adj_test.go +++ b/internal/pkg/table/adj_test.go @@ -75,11 +75,11 @@ func TestAddPathAdjOut(t *testing.T) { p2 := NewPath(pi, nlri2, false, attrs, time.Now(), false) nlri3 := bgp.NewIPAddrPrefix(24, "20.20.20.0") nlri3.SetPathIdentifier(2) - nlri3.SetPathLocalIdentifier(2) + nlri3.SetPathLocalIdentifier(3) p3 := NewPath(pi, nlri3, false, attrs, time.Now(), false) nlri4 := bgp.NewIPAddrPrefix(24, "20.20.20.0") nlri4.SetPathIdentifier(3) - nlri4.SetPathLocalIdentifier(2) + nlri4.SetPathLocalIdentifier(4) p4 := NewPath(pi, nlri4, false, attrs, time.Now(), false) family := p1.GetRouteFamily() families := []bgp.RouteFamily{family} @@ -87,7 +87,7 @@ func TestAddPathAdjOut(t *testing.T) { adj := NewAdjRib(families) adj.UpdateAdjRibOut([]*Path{p1, p2, p3, p4}) assert.Equal(t, len(adj.table[family].destinations), 1) - assert.Equal(t, adj.Count([]bgp.RouteFamily{family}), 2) + assert.Equal(t, adj.Count([]bgp.RouteFamily{family}), 4) } func TestStale(t *testing.T) { |