summaryrefslogtreecommitdiffstats
path: root/tests/topotests/bfd_bgp_cbit_topo3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:56:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:56:25 +0000
commit289582b3dcbeb23328325d224c7db7de66a3a55f (patch)
tree989c36d57aab945c36e34c952f438746ce18b3bd /tests/topotests/bfd_bgp_cbit_topo3
parentReleasing progress-linux version 10.0.1-0.1~progress7.99u1. (diff)
downloadfrr-289582b3dcbeb23328325d224c7db7de66a3a55f.tar.xz
frr-289582b3dcbeb23328325d224c7db7de66a3a55f.zip
Merging upstream version 10.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/topotests/bfd_bgp_cbit_topo3')
-rw-r--r--tests/topotests/bfd_bgp_cbit_topo3/r1/bgp_ipv6_routes_down.json45
-rw-r--r--tests/topotests/bfd_bgp_cbit_topo3/r1/ipv6_routes.json44
-rw-r--r--tests/topotests/bfd_bgp_cbit_topo3/test_bfd_bgp_cbit_topo3.py16
3 files changed, 9 insertions, 96 deletions
diff --git a/tests/topotests/bfd_bgp_cbit_topo3/r1/bgp_ipv6_routes_down.json b/tests/topotests/bfd_bgp_cbit_topo3/r1/bgp_ipv6_routes_down.json
index 5cba71e..61be1df 100644
--- a/tests/topotests/bfd_bgp_cbit_topo3/r1/bgp_ipv6_routes_down.json
+++ b/tests/topotests/bfd_bgp_cbit_topo3/r1/bgp_ipv6_routes_down.json
@@ -4,51 +4,6 @@
"localAS": 101,
"routes":
{
- "2001:db8:6::/64": [
- {
- "stale": true,
- "valid": true,
- "bestpath": true,
- "pathFrom": "external",
- "prefix": "2001:db8:6::",
- "prefixLen": 64,
- "network": "2001:db8:6::\/64",
- "metric": 0,
- "weight": 0,
- "peerId": "2001:db8:4::1",
- "origin": "IGP",
- "nexthops": [
- { "ip": "2001:db8:4::1",
- "afi": "ipv6",
- "scope": "global",
- "used": true
- }
- ]
- }
- ],
- "2001:db8:7::/64": [
- {
- "stale": true,
- "valid": true,
- "bestpath": true,
- "pathFrom": "external",
- "prefix": "2001:db8:7::",
- "prefixLen": 64, "network":
- "2001:db8:7::\/64",
- "metric": 0,
- "weight": 0,
- "peerId": "2001:db8:4::1",
- "origin": "IGP",
- "nexthops": [
- {
- "ip": "2001:db8:4::1",
- "afi": "ipv6",
- "scope": "global",
- "used": true
- }
- ]
- }
- ],
"2001:db8:8::/64": [
{
"valid": true,
diff --git a/tests/topotests/bfd_bgp_cbit_topo3/r1/ipv6_routes.json b/tests/topotests/bfd_bgp_cbit_topo3/r1/ipv6_routes.json
index 8eea183..36cdcc3 100644
--- a/tests/topotests/bfd_bgp_cbit_topo3/r1/ipv6_routes.json
+++ b/tests/topotests/bfd_bgp_cbit_topo3/r1/ipv6_routes.json
@@ -32,49 +32,5 @@
}
]
}
- ],
- "2001:db8:6::/64": [{
- "distance": 20,
- "protocol": "bgp",
- "metric": 0,
- "selected": true,
- "destSelected": true,
- "prefix": "2001:db8:6::/64",
- "nexthops": [{
- "ip":"2001:db8:4::1",
- "active": true,
- "afi": "ipv6",
- "recursive":true
- },
- {
- "fib":true,
- "ip":"2001:db8:1::2",
- "afi": "ipv6",
- "interfaceName": "r1-eth0"
- }
- ]
- }
- ],
- "2001:db8:7::/64": [{
- "distance": 20,
- "protocol": "bgp",
- "metric": 0,
- "selected": true,
- "destSelected": true,
- "prefix": "2001:db8:7::/64",
- "nexthops": [{
- "ip":"2001:db8:4::1",
- "active": true,
- "afi": "ipv6",
- "recursive": true
- },
- {
- "fib":true,
- "ip":"2001:db8:1::2",
- "afi": "ipv6",
- "interfaceName":"r1-eth0"
- }
- ]
- }
]
}
diff --git a/tests/topotests/bfd_bgp_cbit_topo3/test_bfd_bgp_cbit_topo3.py b/tests/topotests/bfd_bgp_cbit_topo3/test_bfd_bgp_cbit_topo3.py
index 906687d..d478e99 100644
--- a/tests/topotests/bfd_bgp_cbit_topo3/test_bfd_bgp_cbit_topo3.py
+++ b/tests/topotests/bfd_bgp_cbit_topo3/test_bfd_bgp_cbit_topo3.py
@@ -122,21 +122,23 @@ def test_bfd_connection():
def test_bfd_loss_intermediate():
"""
- Assert that BFD notices the bfd link down failure.
- but BGP entries should still be present
+ Assert that BGP notices the BFD link down failure.
+ The BGP entries should be flushed as the C-bit is set in both directions.
"""
tgen = get_topogen()
if tgen.routers_have_failure():
pytest.skip(tgen.errors)
r1 = tgen.gears["r1"]
- expected = { "as":101, "peers":{ "2001:db8:4::1": { "state":"Established" } } }
- test_func = partial(topotest.router_json_cmp, r1, "show bgp ipv6 uni summ json", expected)
+ expected = {"as": 101, "peers": {"2001:db8:4::1": {"state": "Established"}}}
+ test_func = partial(
+ topotest.router_json_cmp, r1, "show bgp ipv6 uni summ json", expected
+ )
_, result = topotest.run_and_expect(test_func, None, count=60, wait=1)
- assertmsg ='"r1" has not established bgp peering yet'
+ assertmsg = '"r1" has not established bgp peering yet'
assert result is None, assertmsg
- #assert False
+ # assert False
logger.info("removing IPv6 address from r2 to simulate loss of connectivity")
# Disable r2-eth0 ipv6 address
cmd = 'vtysh -c "configure terminal" -c "interface r2-eth1" -c "no ipv6 address 2001:db8:4::2/64"'
@@ -160,7 +162,7 @@ def test_bfd_loss_intermediate():
assertmsg = '"{}" JSON output mismatches'.format(router.name)
assert result is None, assertmsg
- logger.info("waiting for BGP entries to become stale")
+ logger.info("waiting for BGP entries to be removed")
for router in tgen.routers().values():
if router.name == "r2":
continue