mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-17 18:27:41 +00:00
Merge pull request #16122 from opensourcerouting/fix/add_missing_backports_10.0
tests: fix duplicates in bgp_vrf_route_leak_basic
This commit is contained in:
commit
bbdccae58d
@ -214,149 +214,6 @@ def test_vrf_route_leak_eva():
|
|||||||
assert result, "BGP VRF EVA check failed:\n{}".format(diff)
|
assert result, "BGP VRF EVA check failed:\n{}".format(diff)
|
||||||
|
|
||||||
|
|
||||||
def test_vrf_route_leak_donna():
|
|
||||||
logger.info("Ensure that routes are leaked back and forth")
|
|
||||||
tgen = get_topogen()
|
|
||||||
# Don't run this test if we have any failure.
|
|
||||||
if tgen.routers_have_failure():
|
|
||||||
pytest.skip(tgen.errors)
|
|
||||||
|
|
||||||
r1 = tgen.gears["r1"]
|
|
||||||
|
|
||||||
# Test DONNA VRF.
|
|
||||||
expect = {
|
|
||||||
"10.0.0.0/24": [
|
|
||||||
{
|
|
||||||
"protocol": "connected",
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"10.0.1.0/24": [
|
|
||||||
{
|
|
||||||
"protocol": "bgp",
|
|
||||||
"selected": True,
|
|
||||||
"nexthops": [
|
|
||||||
{
|
|
||||||
"fib": True,
|
|
||||||
"interfaceName": "EVA",
|
|
||||||
"vrf": "EVA",
|
|
||||||
"active": True,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"10.0.2.0/24": [{"protocol": "connected"}],
|
|
||||||
"10.0.3.0/24": [
|
|
||||||
{
|
|
||||||
"protocol": "bgp",
|
|
||||||
"selected": True,
|
|
||||||
"nexthops": [
|
|
||||||
{
|
|
||||||
"fib": True,
|
|
||||||
"interfaceName": "EVA",
|
|
||||||
"vrf": "EVA",
|
|
||||||
"active": True,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"10.0.4.0/24": [
|
|
||||||
{
|
|
||||||
"protocol": "bgp",
|
|
||||||
"selected": True,
|
|
||||||
"nexthops": [
|
|
||||||
{
|
|
||||||
"fib": True,
|
|
||||||
"interfaceName": "lo",
|
|
||||||
"vrf": "default",
|
|
||||||
"active": True,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"172.16.101.0/24": [
|
|
||||||
{
|
|
||||||
"protocol": "bgp",
|
|
||||||
"nexthops": [
|
|
||||||
{
|
|
||||||
"interfaceIndex": 0,
|
|
||||||
"interfaceName": "unknown",
|
|
||||||
"vrf": "Unknown",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
test_func = partial(
|
|
||||||
topotest.router_json_cmp, r1, "show ip route vrf DONNA json", expect
|
|
||||||
)
|
|
||||||
result, diff = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
|
|
||||||
assert result, "BGP VRF DONNA check failed:\n{}".format(diff)
|
|
||||||
|
|
||||||
|
|
||||||
def test_vrf_route_leak_eva():
|
|
||||||
logger.info("Ensure that routes are leaked back and forth")
|
|
||||||
tgen = get_topogen()
|
|
||||||
# Don't run this test if we have any failure.
|
|
||||||
if tgen.routers_have_failure():
|
|
||||||
pytest.skip(tgen.errors)
|
|
||||||
|
|
||||||
r1 = tgen.gears["r1"]
|
|
||||||
|
|
||||||
# Test EVA VRF.
|
|
||||||
expect = {
|
|
||||||
"10.0.0.0/24": [
|
|
||||||
{
|
|
||||||
"protocol": "bgp",
|
|
||||||
"selected": True,
|
|
||||||
"nexthops": [
|
|
||||||
{
|
|
||||||
"fib": True,
|
|
||||||
"interfaceName": "DONNA",
|
|
||||||
"vrf": "DONNA",
|
|
||||||
"active": True,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"10.0.1.0/24": [
|
|
||||||
{
|
|
||||||
"protocol": "connected",
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"10.0.2.0/24": [
|
|
||||||
{
|
|
||||||
"protocol": "bgp",
|
|
||||||
"selected": True,
|
|
||||||
"nexthops": [
|
|
||||||
{
|
|
||||||
"fib": True,
|
|
||||||
"interfaceName": "DONNA",
|
|
||||||
"vrf": "DONNA",
|
|
||||||
"active": True,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"10.0.3.0/24": [
|
|
||||||
{
|
|
||||||
"protocol": "connected",
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"172.16.101.0/24": [
|
|
||||||
{
|
|
||||||
"protocol": "bgp",
|
|
||||||
"nexthops": [
|
|
||||||
{
|
|
||||||
"interfaceIndex": 0,
|
|
||||||
"interfaceName": "unknown",
|
|
||||||
"vrf": "Unknown",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def test_vrf_route_leak_default():
|
def test_vrf_route_leak_default():
|
||||||
logger.info("Ensure that routes are leaked back and forth")
|
logger.info("Ensure that routes are leaked back and forth")
|
||||||
|
Loading…
Reference in New Issue
Block a user