summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/topotests/ospf6_topo2/test_ospf6_topo2.py27
-rw-r--r--tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py16
2 files changed, 23 insertions, 20 deletions
diff --git a/tests/topotests/ospf6_topo2/test_ospf6_topo2.py b/tests/topotests/ospf6_topo2/test_ospf6_topo2.py
index eb8561c404..d17aeda3ea 100644
--- a/tests/topotests/ospf6_topo2/test_ospf6_topo2.py
+++ b/tests/topotests/ospf6_topo2/test_ospf6_topo2.py
@@ -134,6 +134,7 @@ def build_topo(tgen):
switch = tgen.add_switch("s4")
switch.add_link(tgen.gears["r4"], nodeif="r4-stubnet")
+
def setup_module(mod):
"Sets up the pytest environment"
tgen = Topogen(build_topo, mod.__name__)
@@ -585,10 +586,11 @@ def test_nssa_range():
logger.info("Expecting NSSA range to be added on r3")
routes = {
"2001:db8:1000::/64": {
- "metricType":2,
- "metricCost":20,
- "metricCostE2":10,
- }}
+ "metricType": 2,
+ "metricCost": 20,
+ "metricCostE2": 10,
+ }
+ }
expect_ospfv3_routes("r3", routes, wait=30, type="external-2", detail=True)
# Change the NSSA range cost.
@@ -601,10 +603,11 @@ def test_nssa_range():
logger.info("Expecting NSSA range to be updated with new cost")
routes = {
"2001:db8:1000::/64": {
- "metricType":2,
- "metricCost":20,
- "metricCostE2":1000,
- }}
+ "metricType": 2,
+ "metricCost": 20,
+ "metricCostE2": 1000,
+ }
+ }
expect_ospfv3_routes("r3", routes, wait=30, type="external-2", detail=True)
# Configure the NSSA range to not be advertised.
@@ -631,12 +634,12 @@ def test_nssa_range():
logger.info("Expecting previously summarized routes to be re-added")
routes = {
"2001:db8:1000::1/128": {
- "metricType":2,
- "metricCost":20,
+ "metricType": 2,
+ "metricCostE2": 20,
},
"2001:db8:1000::2/128": {
- "metricType":2,
- "metricCost":20,
+ "metricType": 2,
+ "metricCostE2": 20,
},
}
expect_ospfv3_routes("r3", routes, wait=30, type="external-2", detail=True)
diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py
index 3ec31f3fa8..36cde06c3e 100644
--- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py
+++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py
@@ -2102,6 +2102,14 @@ def test_ospfv3_type5_summary_tc46_p0(request):
), "Testcase {} : Failed" "Error: Summary missing in OSPF DB".format(tc_name)
step("Verify that originally advertised routes are withdraw from there" " peer.")
+ output = tgen.gears["r0"].vtysh_cmd(
+ "show ipv6 ospf6 database as-external json", isjson=True
+ )
+
+ output = tgen.gears["r1"].vtysh_cmd(
+ "show ipv6 ospf6 database as-external json", isjson=True
+ )
+
input_dict = {
"r0": {"static_routes": [{"network": NETWORK["ipv6"], "next_hop": "blackhole"}]}
}
@@ -2113,14 +2121,6 @@ def test_ospfv3_type5_summary_tc46_p0(request):
tc_name, result
)
- output = tgen.gears["r0"].vtysh_cmd(
- "show ipv6 ospf6 database as-external json", isjson=True
- )
-
- output = tgen.gears["r1"].vtysh_cmd(
- "show ipv6 ospf6 database as-external json", isjson=True
- )
-
result = verify_rib(
tgen, "ipv6", dut, input_dict, protocol=protocol, expected=False
)