summaryrefslogtreecommitdiff
path: root/tests/topotests/ospf_basic_functionality/test_ospf_chaos.py
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-03-08 09:32:09 +0200
committerGitHub <noreply@github.com>2021-03-08 09:32:09 +0200
commitf79d311b3e0ea744cad115978b10bad2661afea9 (patch)
tree4e6e1e7e976f2211616095f15077442719b4fb9a /tests/topotests/ospf_basic_functionality/test_ospf_chaos.py
parentdf29adc0f1b41be0d4c74eb1c5c975dbe11bda99 (diff)
parent5cbb02ebde5deb71f9db5a23697087d79507a3f2 (diff)
Merge pull request #8180 from kuldeepkash/topojson_framework
tests: Improve error/assert message logging
Diffstat (limited to 'tests/topotests/ospf_basic_functionality/test_ospf_chaos.py')
-rw-r--r--tests/topotests/ospf_basic_functionality/test_ospf_chaos.py30
1 files changed, 16 insertions, 14 deletions
diff --git a/tests/topotests/ospf_basic_functionality/test_ospf_chaos.py b/tests/topotests/ospf_basic_functionality/test_ospf_chaos.py
index 0dedc8f0df..cebe55b39c 100644
--- a/tests/topotests/ospf_basic_functionality/test_ospf_chaos.py
+++ b/tests/topotests/ospf_basic_functionality/test_ospf_chaos.py
@@ -249,16 +249,17 @@ def test_ospf_chaos_tc31_p1(request):
dut = "r1"
protocol = "ospf"
result = verify_ospf_rib(tgen, dut, input_dict, 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 \n Error: {}".format(
tc_name, result
- )
+ ))
- result = verify_rib(
- tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False
- )
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol,
+ expected=False)
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
step("Bring up OSPFd daemon on R0.")
start_router_daemons(tgen, "r0", ["ospfd"])
@@ -481,16 +482,17 @@ def test_ospf_chaos_tc34_p1(request):
dut = "r1"
protocol = "ospf"
result = verify_ospf_rib(tgen, dut, input_dict, 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 \n Error: {}".format(
tc_name, result
- )
+ ))
- result = verify_rib(
- tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False
- )
- assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+ result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol,
+ expected=False)
+ assert result is not True, ("Testcase {} : Failed \n "
+ "r1: routes are still present \n Error: {}".format(
tc_name, result
- )
+ ))
step("Bring up staticd daemon on R0.")
start_router_daemons(tgen, "r0", ["staticd"])