summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2023-03-31 16:39:11 +0000
committerChristian Hopps <chopps@labn.net>2023-03-31 15:15:52 -0400
commit8fb208222938c1e0cafb13596d2d40c9c446325b (patch)
treec494d81576f5e2ff05140f7d2599d03513324909
parent4fe50326b9394c921b35dccdd564df857d1def19 (diff)
tests: when verifying a route is missing use expected=False
Prior to this the full retry cycle was run with a "passing" negative result each time through Previous runtime ~5 minutes New runtime ~20 seconds. Signed-off-by: Christian Hopps <chopps@labn.net>
-rw-r--r--tests/topotests/mgmt_tests/test_yang_mgmt.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/topotests/mgmt_tests/test_yang_mgmt.py b/tests/topotests/mgmt_tests/test_yang_mgmt.py
index 06c18d7dfa..921b4e622c 100644
--- a/tests/topotests/mgmt_tests/test_yang_mgmt.py
+++ b/tests/topotests/mgmt_tests/test_yang_mgmt.py
@@ -217,7 +217,9 @@ def test_mgmt_commit_check(request):
]
}
}
- result = verify_rib(tgen, "ipv4", dut, input_dict_4, protocol=protocol)
+ result = verify_rib(
+ tgen, "ipv4", dut, input_dict_4, protocol=protocol, expected=False
+ )
assert (
result is not True
), "Testcase {} : Failed" "Error: Routes is missing in RIB".format(tc_name)
@@ -319,7 +321,9 @@ def test_mgmt_commit_abort(request):
]
}
}
- result = verify_rib(tgen, "ipv4", dut, input_dict_4, protocol=protocol)
+ result = verify_rib(
+ tgen, "ipv4", dut, input_dict_4, protocol=protocol, expected=False
+ )
assert (
result is not True
), "Testcase {} : Failed" "Error: Routes is missing in RIB".format(tc_name)
@@ -372,7 +376,7 @@ def test_mgmt_delete_config(request):
assert (
result is True
), "Testcase {} : Failed" "Error: Routes is missing in RIB".format(tc_name)
-
+
step("Mgmt delete config")
raw_config = {
"r1": {
@@ -387,7 +391,9 @@ def test_mgmt_delete_config(request):
assert result is True, "Testcase {} : Failed Error: {}".format(tc_name, result)
step("Verify that the route is deleted from RIB")
- result = verify_rib(tgen, "ipv4", dut, input_dict_4, protocol=protocol)
+ result = verify_rib(
+ tgen, "ipv4", dut, input_dict_4, protocol=protocol, expected=False
+ )
assert (
result is not True
), "Testcase {} : Failed" "Error: Routes is still present in RIB".format(tc_name)
@@ -461,7 +467,9 @@ def test_mgmt_chaos_stop_start_frr(request):
dut = "r1"
protocol = "static"
input_dict_4 = {"r1": {"static_routes": [{"network": "192.1.11.200/32"}]}}
- result = verify_rib(tgen, "ipv4", dut, input_dict_4, protocol=protocol)
+ result = verify_rib(
+ tgen, "ipv4", dut, input_dict_4, protocol=protocol, expected=False
+ )
assert (
result is not True
), "Testcase {} : Failed" "Error: Routes still present in RIB".format(tc_name)