]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #12645 from gpnaveen/ospf_error_msg_enhancements
authorRuss White <russ@riw.us>
Wed, 29 Mar 2023 15:05:30 +0000 (11:05 -0400)
committerGitHub <noreply@github.com>
Wed, 29 Mar 2023 15:05:30 +0000 (11:05 -0400)
tests: [topojson] Update assert/error messages for ospf scripts

22 files changed:
1  2 
tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_topo1.py
tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_type7_lsa.py
tests/topotests/ospf_basic_functionality/test_ospf_authentication.py
tests/topotests/ospf_basic_functionality/test_ospf_chaos.py
tests/topotests/ospf_basic_functionality/test_ospf_ecmp.py
tests/topotests/ospf_basic_functionality/test_ospf_ecmp_lan.py
tests/topotests/ospf_basic_functionality/test_ospf_lan.py
tests/topotests/ospf_basic_functionality/test_ospf_nssa.py
tests/topotests/ospf_basic_functionality/test_ospf_routemaps.py
tests/topotests/ospf_basic_functionality/test_ospf_rte_calc.py
tests/topotests/ospf_basic_functionality/test_ospf_single_area.py
tests/topotests/ospf_gr_helper/test_ospf_gr_helper1.py
tests/topotests/ospf_gr_helper/test_ospf_gr_helper2.py
tests/topotests/ospf_gr_helper/test_ospf_gr_helper3.py
tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py
tests/topotests/ospfv3_basic_functionality/test_ospfv3_authentication.py
tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp.py
tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp_lan.py
tests/topotests/ospfv3_basic_functionality/test_ospfv3_nssa2.py
tests/topotests/ospfv3_basic_functionality/test_ospfv3_routemaps.py
tests/topotests/ospfv3_basic_functionality/test_ospfv3_rte_calc.py
tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py

index 3d15e94a51e0bfcbd8d176a5ce128cf606521cc7,fa26e165caf05b80013b1111be230892a48a64be..9d7a15833c16b3eb487f19dad13f8d0c86c61970
@@@ -2040,15 -2039,16 +2026,16 @@@ def test_ospf_type5_summary_tc46_p0(req
      result = verify_rib(
          tgen, "ipv4", dut, input_dict_summary, protocol=protocol, expected=False
      )
-     assert (
-         result is not True
-     ), "Testcase {} : Failed" "Error: Routes still present in RIB".format(tc_name)
+     assert result is not True, (
+         "Testcase {} : Failed\n Expected: Routes should not be present in RIB."
+         "Error: Routes still present in RIB".format(tc_name)
+     )
  
-     step("Verify that show ip ospf summary should show the " "configured summaries.")
+     step("Verify that show ip ospf summary should show the  configured summaries.")
      input_dict = {
          SUMMARY["ipv4"][0]: {
 -            "Summary address": SUMMARY["ipv4"][0],
 -            "External route count": 5,
 +            "summaryAddress": SUMMARY["ipv4"][0],
 +            "externalRouteCount": 5,
          }
      }
      dut = "r0"
      result = verify_rib(
          tgen, "ipv4", dut, input_dict_summary, protocol=protocol, expected=False
      )
-     assert (
-         result is not True
-     ), "Testcase {} : Failed" "Error: Routes still present in RIB".format(tc_name)
+     assert result is not True, (
+         "Testcase {} : Failed \n Expected: Routes should not be present in RIB \n"
+         "Error: Routes still present in RIB".format(tc_name)
+     )
  
-     step("Verify that show ip ospf summary should show the " "configured summaries.")
+     step("Verify that show ip ospf summary should show the  configured summaries.")
      input_dict = {
          SUMMARY["ipv4"][0]: {
 -            "Summary address": SUMMARY["ipv4"][0],
 -            "External route count": 5,
 +            "summaryAddress": SUMMARY["ipv4"][0],
 +            "externalRouteCount": 5,
          }
      }
      dut = "r0"
index 55166367c1e7baf48eaa31c790ecd0399392d049,33a4fd804e712077b727248da4003fa4d64b07dd..b0e56e619a096fa9a88845856741ba444561e304
@@@ -1896,13 -1897,13 +1884,13 @@@ def test_ospfv3_type5_summary_tc46_p0(r
      )
      assert (
          result is not True
-     ), "Testcase {} : Failed" "Error: Routes still present in RIB".format(tc_name)
+     ), "Testcase {} : Failed Error: Routes still present in RIB".format(tc_name)
  
-     step("Verify that show ip ospf summary should show the " "configured summaries.")
+     step("Verify that show ip ospf summary should show the  configured summaries.")
      input_dict = {
          SUMMARY["ipv6"][0]: {
 -            "Summary address": SUMMARY["ipv6"][0],
 -            "External route count": 5,
 +            "summaryAddress": SUMMARY["ipv6"][0],
 +            "externalRouteCount": 5,
          }
      }
      dut = "r0"
      )
      assert (
          result is not True
-     ), "Testcase {} : Failed" "Error: Routes still present in RIB".format(tc_name)
+     ), "Testcase {} : Failed Error: Routes still present in RIB".format(tc_name)
  
-     step("Verify that show ip ospf summary should show the " "configured summaries.")
+     step("Verify that show ip ospf summary should show the  configured summaries.")
      input_dict = {
          SUMMARY["ipv6"][0]: {
 -            "Summary address": SUMMARY["ipv6"][0],
 -            "External route count": 5,
 +            "summaryAddress": SUMMARY["ipv6"][0],
 +            "externalRouteCount": 5,
          }
      }
      dut = "r0"