summaryrefslogtreecommitdiff
path: root/tests/topotests/ospf_basic_functionality/test_ospf_rte_calc.py
diff options
context:
space:
mode:
authorKuldeep Kashyap <kashyapk@vmware.com>2021-03-01 19:22:25 -0800
committerKuldeep Kashyap <kashyapk@vmware.com>2021-03-06 00:51:43 -0800
commit5cbb02ebde5deb71f9db5a23697087d79507a3f2 (patch)
tree16332715e9d883446c8180a52e85d2cf44fc14b7 /tests/topotests/ospf_basic_functionality/test_ospf_rte_calc.py
parent130daf24ae1acf5db602e55c13b9ffca139a1dbf (diff)
tests: Improve error/assert message logging
1. Improved error meesage logging. 2. No functionality changes only put some meaningfull error messages. Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
Diffstat (limited to 'tests/topotests/ospf_basic_functionality/test_ospf_rte_calc.py')
-rw-r--r--tests/topotests/ospf_basic_functionality/test_ospf_rte_calc.py24
1 files changed, 16 insertions, 8 deletions
diff --git a/tests/topotests/ospf_basic_functionality/test_ospf_rte_calc.py b/tests/topotests/ospf_basic_functionality/test_ospf_rte_calc.py
index 5aa2779aee..fb6b28ce5b 100644
--- a/tests/topotests/ospf_basic_functionality/test_ospf_rte_calc.py
+++ b/tests/topotests/ospf_basic_functionality/test_ospf_rte_calc.py
@@ -247,9 +247,11 @@ def test_ospf_redistribution_tc5_p0(request):
if result is not True:
break
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present after deleting ip address of newly "
+ "configured interface of R0 \n Error: {}".format(
tc_name, result
- )
+ ))
protocol = "ospf"
result = verify_rib(
@@ -262,9 +264,11 @@ def test_ospf_redistribution_tc5_p0(request):
attempts=5,
expected=False,
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present in fib after deleting ip address of newly "
+ "configured interface of R0 \n Error: {}".format(
tc_name, result
- )
+ ))
step("Add back the deleted ip address on newly configured interface of R0")
topo1 = {
@@ -366,9 +370,11 @@ def test_ospf_redistribution_tc6_p0(request):
result = verify_ospf_rib(tgen, dut, input_dict, next_hop=nh, expected=False)
if result is not True:
break
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present after deleting ip address of newly "
+ "configured loopback of R0 \n Error: {}".format(
tc_name, result
- )
+ ))
protocol = "ospf"
result = verify_rib(
@@ -380,9 +386,11 @@ def test_ospf_redistribution_tc6_p0(request):
next_hop=nh,
expected=False,
)
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: OSPF routes are present in fib after deleting ip address of newly "
+ "configured loopback of R0 \n Error: {}".format(
tc_name, result
- )
+ ))
step("Add back the deleted ip address on newly configured interface of R0")
topo1 = {