Skip to content

Commit

Permalink
tests: update route_leak_basic tests
Browse files Browse the repository at this point in the history
Update route_leak_basic tests. The routes with an unusable nexthop VRF
are no more present in the RIB.

Signed-off-by: Louis Scalbert <[email protected]>
  • Loading branch information
louis-6wind committed Dec 13, 2024
1 parent 9fc6bce commit 4ab0543
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 140 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,7 @@ def test_vrf_route_leak_donna():
],
},
],
"172.16.101.0/24": [
{
"protocol": "bgp",
"selected": None,
"nexthops": [
{
"fib": None,
"interfaceName": "unknown",
"vrf": "Unknown",
"active": None,
},
],
},
],
"172.16.101.0/24": None,
}

test_func = partial(
Expand Down Expand Up @@ -191,20 +178,7 @@ def test_vrf_route_leak_eva():
"protocol": "connected",
}
],
"172.16.101.0/24": [
{
"protocol": "bgp",
"selected": None,
"nexthops": [
{
"fib": None,
"interfaceName": "unknown",
"vrf": "Unknown",
"active": None,
},
],
},
],
"172.16.101.0/24": None,
}

test_func = partial(
Expand Down Expand Up @@ -298,34 +272,8 @@ def test_vrf_route_leak_donna_after_eva_down():

# Test DONNA VRF.
expect = {
"10.0.1.0/24": [
{
"protocol": "bgp",
"selected": None,
"nexthops": [
{
"fib": None,
"interfaceName": "EVA",
"vrf": "EVA",
"active": None,
},
],
},
],
"10.0.3.0/24": [
{
"protocol": "bgp",
"selected": None,
"nexthops": [
{
"fib": None,
"interfaceName": "EVA",
"vrf": "EVA",
"active": None,
},
],
},
],
"10.0.1.0/24": None,
"10.0.3.0/24": None,
}

test_func = partial(
Expand Down Expand Up @@ -417,20 +365,7 @@ def test_vrf_route_leak_donna_add_vrf_zita():

# Test DONNA VRF.
expect = {
"172.16.101.0/24": [
{
"protocol": "bgp",
"selected": None,
"nexthops": [
{
"fib": None,
"interfaceName": "ZITA",
"vrf": "ZITA",
"active": None,
},
],
},
],
"172.16.101.0/24": None,
}

test_func = partial(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,7 @@ def test_vrf_route_leak_donna():
],
},
],
"172.16.101.0/24": [
{
"protocol": "bgp",
"selected": None,
"nexthops": [
{
"fib": None,
"interfaceName": "unknown",
"vrf": "Unknown",
"active": None,
},
],
},
],
"172.16.101.0/24": None,
}

test_func = partial(
Expand Down Expand Up @@ -195,20 +182,7 @@ def test_vrf_route_leak_eva():
"protocol": "connected",
}
],
"172.16.101.0/24": [
{
"protocol": "bgp",
"selected": None,
"nexthops": [
{
"fib": None,
"interfaceName": "unknown",
"vrf": "Unknown",
"active": None,
},
],
},
],
"172.16.101.0/24": None,
}

test_func = partial(
Expand Down Expand Up @@ -302,34 +276,8 @@ def test_vrf_route_leak_donna_after_eva_down():

# Test DONNA VRF.
expect = {
"10.0.1.0/24": [
{
"protocol": "bgp",
"selected": None,
"nexthops": [
{
"fib": None,
"interfaceName": "EVA",
"vrf": "EVA",
"active": None,
},
],
},
],
"10.0.3.0/24": [
{
"protocol": "bgp",
"selected": None,
"nexthops": [
{
"fib": None,
"interfaceName": "EVA",
"vrf": "EVA",
"active": None,
},
],
},
],
"10.0.1.0/24": None,
"10.0.3.0/24": None,
}

test_func = partial(
Expand Down Expand Up @@ -421,20 +369,7 @@ def test_vrf_route_leak_donna_add_vrf_zita():

# Test DONNA VRF.
expect = {
"172.16.101.0/24": [
{
"protocol": "bgp",
"selected": None,
"nexthops": [
{
"fib": None,
"interfaceName": "ZITA",
"vrf": "ZITA",
"active": None,
},
],
},
],
"172.16.101.0/24": None,
}

test_func = partial(
Expand Down

0 comments on commit 4ab0543

Please sign in to comment.