TestApplyToPathList_WithdrawIgnored verifies that withdraw paths are skipped.
(t *testing.T)
| 373 | |
| 374 | // TestApplyToPathList_WithdrawIgnored verifies that withdraw paths are skipped. |
| 375 | func TestApplyToPathList_WithdrawIgnored(t *testing.T) { |
| 376 | assert := assert.New(t) |
| 377 | |
| 378 | nlri, _ := bgp.NewIPAddrPrefix(netip.MustParsePrefix("10.3.1.0/24")) |
| 379 | nh, _ := bgp.NewPathAttributeNextHop(testNextHop) |
| 380 | attrs := []bgp.PathAttributeInterface{ |
| 381 | bgp.NewPathAttributeOrigin(bgp.BGP_ORIGIN_ATTR_TYPE_INCOMPLETE), |
| 382 | nh, |
| 383 | } |
| 384 | path := table.NewPath(bgp.RF_IPv4_UC, nil, bgp.PathNLRI{NLRI: nlri}, true, attrs, time.Now(), false) |
| 385 | |
| 386 | cache := nexthopStateCache{ |
| 387 | testNextHop: 20, |
| 388 | } |
| 389 | |
| 390 | updated := cache.applyToPathList([]*table.Path{path}) |
| 391 | assert.Empty(updated, "withdraw paths must be skipped") |
| 392 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…