From 991a971fe9d5126c77c235a440fa9025fd0420e2 Mon Sep 17 00:00:00 2001 From: Kuldeep Kashyap Date: Tue, 13 Dec 2022 10:26:14 -0800 Subject: tests: Cleaning up daemon param used in start_topology() Earlier daemon parameter was passed to start_topology(), which is not needed now, as new code is implemented to start feature specific daemons. Signed-off-by: Kuldeep Kashyap --- .../ospfv3_basic_functionality/test_ospfv3_authentication.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tests/topotests/ospfv3_basic_functionality/test_ospfv3_authentication.py') diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_authentication.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_authentication.py index d32a05a88e..c206923b94 100644 --- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_authentication.py +++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_authentication.py @@ -50,7 +50,6 @@ from lib.common_config import ( reset_config_on_routers, step, shutdown_bringup_interface, - topo_daemons, ) from lib.topolog import logger from lib.topojson import build_topo_from_json, build_config_from_json @@ -112,12 +111,9 @@ def setup_module(mod): topo = tgen.json_topo # ... and here it calls Mininet initialization functions. - # get list of daemons needs to be started for this suite. - daemons = topo_daemons(tgen, topo) - # Starting topology, create tmp files which are loaded to routers # to start daemons and then start routers - start_topology(tgen, daemons) + start_topology(tgen) # Creating configuration from JSON build_config_from_json(tgen, topo) -- cgit v1.2.3 From ac6ef90b879b8d9251251bb0e634ff19946e47db Mon Sep 17 00:00:00 2001 From: Kuldeep Kashyap Date: Tue, 13 Dec 2022 10:38:44 -0800 Subject: tests: Fix frrbot style issues There were some style issues found by frrbot, fixing as part of this commit. Signed-off-by: Kuldeep Kashyap --- .../evpn_type5_test_topo1/test_evpn_type5_topo1.py | 249 +++++++++++---------- .../test_multicast_pim6_static_rp1.py | 29 ++- .../test_multicast_pim6_static_rp2.py | 1 + .../test_pim_dr_nondr_with_ospf_topo2.py | 4 +- .../test_multicast_pim_static_rp1.py | 2 - .../test_multicast_pim_uplink_topo1.py | 58 ++--- .../test_ospfv3_authentication.py | 53 ++--- 7 files changed, 211 insertions(+), 185 deletions(-) (limited to 'tests/topotests/ospfv3_basic_functionality/test_ospfv3_authentication.py') diff --git a/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py b/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py index 313d56a981..b6a6037128 100644 --- a/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py +++ b/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py @@ -71,7 +71,7 @@ from lib.common_config import ( configure_brctl, create_interface_in_kernel, kill_router_daemons, - start_router_daemons + start_router_daemons, ) from lib.topolog import logger @@ -1765,34 +1765,41 @@ def test_evpn_address_family_with_graceful_restart_p0(request): for addr_type in ADDR_TYPES: input_dict_1 = { "r3": { - "static_routes": [{ - "network": NETWORK1_2[addr_type], - "next_hop": NEXT_HOP_IP[addr_type], - "vrf": "RED" - }] + "static_routes": [ + { + "network": NETWORK1_2[addr_type], + "next_hop": NEXT_HOP_IP[addr_type], + "vrf": "RED", + } + ] + }, + "r4": { + "static_routes": [ + { + "network": NETWORK1_3[addr_type], + "next_hop": NEXT_HOP_IP[addr_type], + "vrf": "BLUE", + }, + { + "network": NETWORK1_4[addr_type], + "next_hop": NEXT_HOP_IP[addr_type], + "vrf": "GREEN", + }, + ] }, - "r4":{ - "static_routes": [{ - "network": NETWORK1_3[addr_type], - "next_hop": NEXT_HOP_IP[addr_type], - "vrf": "BLUE" - }, - { - "network": NETWORK1_4[addr_type], - "next_hop": NEXT_HOP_IP[addr_type], - "vrf": "GREEN" - }] - } } result = create_static_routes(tgen, input_dict_1) - assert result is True, 'Testcase {} : Failed \n Error: {}'.format( - tc_name, result) + assert result is True, "Testcase {} : Failed \n Error: {}".format( + tc_name, result + ) - step("Redistribute static in (IPv4 and IPv6) address-family " - "on Edge-1 for all VRFs.") + step( + "Redistribute static in (IPv4 and IPv6) address-family " + "on Edge-1 for all VRFs." + ) - input_dict_2={} + input_dict_2 = {} for dut in ["r3", "r4"]: temp = {dut: {"bgp": []}} input_dict_2.update(temp) @@ -1811,108 +1818,116 @@ def test_evpn_address_family_with_graceful_restart_p0(request): "vrf": vrf, "address_family": { "ipv4": { - "unicast": { - "redistribute": [{ - "redist_type": "static" - }] - } + "unicast": {"redistribute": [{"redist_type": "static"}]} }, "ipv6": { - "unicast": { - "redistribute": [{ - "redist_type": "static" - }] - } - } - } - }) + "unicast": {"redistribute": [{"redist_type": "static"}]} + }, + }, + } + ) result = create_router_bgp(tgen, topo, input_dict_2) - assert result is True, "Testcase {} :Failed \n Error: {}". \ - format(tc_name, result) + assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result) - step("Verify on router Edge-1 that EVPN routes corresponding to " - "all VRFs are received from both routers DCG-1 and DCG-2") + step( + "Verify on router Edge-1 that EVPN routes corresponding to " + "all VRFs are received from both routers DCG-1 and DCG-2" + ) for addr_type in ADDR_TYPES: input_routes = { "r3": { - "static_routes": [{ - "network": NETWORK1_2[addr_type], - "next_hop": NEXT_HOP_IP[addr_type], - "vrf": "RED" - }] + "static_routes": [ + { + "network": NETWORK1_2[addr_type], + "next_hop": NEXT_HOP_IP[addr_type], + "vrf": "RED", + } + ] + }, + "r4": { + "static_routes": [ + { + "network": NETWORK1_3[addr_type], + "next_hop": NEXT_HOP_IP[addr_type], + "vrf": "BLUE", + }, + { + "network": NETWORK1_4[addr_type], + "next_hop": NEXT_HOP_IP[addr_type], + "vrf": "GREEN", + }, + ] }, - "r4":{ - "static_routes": [{ - "network": NETWORK1_3[addr_type], - "next_hop": NEXT_HOP_IP[addr_type], - "vrf": "BLUE" - }, - { - "network": NETWORK1_4[addr_type], - "next_hop": NEXT_HOP_IP[addr_type], - "vrf": "GREEN" - }] - } } result = verify_rib(tgen, addr_type, "e1", input_routes) - assert result is True, "Testcase {} :Failed \n Error: {}". \ - format(tc_name, result) + assert result is True, "Testcase {} :Failed \n Error: {}".format( + tc_name, result + ) - step("Configure DCG-2 as GR restarting node for EVPN session between" + step( + "Configure DCG-2 as GR restarting node for EVPN session between" " DCG-2 and EDGE-1, following by a session reset using 'clear bgp *'" - " command.") + " command." + ) input_dict_gr = { "d2": { - "bgp": - [ + "bgp": [ { "local_as": "200", "graceful-restart": { "graceful-restart": True, - } + }, } ] } } result = create_router_bgp(tgen, topo, input_dict_gr) - assert result is True, "Testcase {} : Failed \n Error: {}".format( - tc_name, result) + assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result) - step("Verify that DCG-2 changes it's role to GR-restarting router " - "and EDGE-1 becomes the GR-helper.") + step( + "Verify that DCG-2 changes it's role to GR-restarting router " + "and EDGE-1 becomes the GR-helper." + ) step("Kill BGPd daemon on DCG-2.") kill_router_daemons(tgen, "d2", ["bgpd"]) - step("Verify that EDGE-1 keep stale entries for EVPN RT-5 routes " - "received from DCG-2 before the restart.") + step( + "Verify that EDGE-1 keep stale entries for EVPN RT-5 routes " + "received from DCG-2 before the restart." + ) for addr_type in ADDR_TYPES: input_routes = { - "r4":{ - "static_routes": [{ - "network": NETWORK1_3[addr_type], - "next_hop": NEXT_HOP_IP[addr_type], - "vrf": "BLUE" - }, - { - "network": NETWORK1_4[addr_type], - "next_hop": NEXT_HOP_IP[addr_type], - "vrf": "GREEN" - }] + "r4": { + "static_routes": [ + { + "network": NETWORK1_3[addr_type], + "next_hop": NEXT_HOP_IP[addr_type], + "vrf": "BLUE", + }, + { + "network": NETWORK1_4[addr_type], + "next_hop": NEXT_HOP_IP[addr_type], + "vrf": "GREEN", + }, + ] } } result = verify_evpn_routes(tgen, topo, "e1", input_routes) - assert result is True, "Testcase {} :Failed \n Error: {}". \ - format(tc_name, result) + assert result is True, "Testcase {} :Failed \n Error: {}".format( + tc_name, result + ) - step("Verify that DCG-2 keeps BGP routes in Zebra until BGPd " - "comes up or end of 'rib-stale-time'") + step( + "Verify that DCG-2 keeps BGP routes in Zebra until BGPd " + "comes up or end of 'rib-stale-time'" + ) step("Start BGPd daemon on DCG-2.") start_router_daemons(tgen, "d2", ["bgpd"]) @@ -1920,44 +1935,52 @@ def test_evpn_address_family_with_graceful_restart_p0(request): step("Verify that EDGE-1 removed all the stale entries.") for addr_type in ADDR_TYPES: input_routes = { - "r4":{ - "static_routes": [{ - "network": NETWORK1_3[addr_type], - "next_hop": NEXT_HOP_IP[addr_type], - "vrf": "BLUE" - }, - { - "network": NETWORK1_4[addr_type], - "next_hop": NEXT_HOP_IP[addr_type], - "vrf": "GREEN" - }] + "r4": { + "static_routes": [ + { + "network": NETWORK1_3[addr_type], + "next_hop": NEXT_HOP_IP[addr_type], + "vrf": "BLUE", + }, + { + "network": NETWORK1_4[addr_type], + "next_hop": NEXT_HOP_IP[addr_type], + "vrf": "GREEN", + }, + ] } } result = verify_evpn_routes(tgen, topo, "e1", input_routes) - assert result is True, "Testcase {} :Failed \n Error: {}". \ - format(tc_name, result) + assert result is True, "Testcase {} :Failed \n Error: {}".format( + tc_name, result + ) - step("Verify that DCG-2 refresh zebra with EVPN routes. " - "(no significance of 'rib-stale-time'") + step( + "Verify that DCG-2 refresh zebra with EVPN routes. " + "(no significance of 'rib-stale-time'" + ) for addr_type in ADDR_TYPES: input_routes = { - "r4":{ - "static_routes": [{ - "network": NETWORK1_3[addr_type], - "next_hop": NEXT_HOP_IP[addr_type], - "vrf": "BLUE" - }, - { - "network": NETWORK1_4[addr_type], - "next_hop": NEXT_HOP_IP[addr_type], - "vrf": "GREEN" - }] + "r4": { + "static_routes": [ + { + "network": NETWORK1_3[addr_type], + "next_hop": NEXT_HOP_IP[addr_type], + "vrf": "BLUE", + }, + { + "network": NETWORK1_4[addr_type], + "next_hop": NEXT_HOP_IP[addr_type], + "vrf": "GREEN", + }, + ] } } result = verify_rib(tgen, addr_type, "d2", input_routes) - assert result is True, "Testcase {} :Failed \n Error: {}". \ - format(tc_name, result) + assert result is True, "Testcase {} :Failed \n Error: {}".format( + tc_name, result + ) write_test_footer(tc_name) diff --git a/tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp1.py b/tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp1.py index 0e90adb7c5..285f0dcebc 100755 --- a/tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp1.py +++ b/tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp1.py @@ -280,8 +280,9 @@ def test_pim6_add_delete_static_RP_p0(request): shutdown_bringup_interface(tgen, "r1", intf, ifaceaction=False) step("Enable PIM6 between r1 and r2") - step("Enable MLD on r1 interface and send MLD " "join {} to r1".\ - format(GROUP_RANGE_1)) + step( + "Enable MLD on r1 interface and send MLD " "join {} to r1".format(GROUP_RANGE_1) + ) step("Configure r2 loopback interface as RP") input_dict = { "r2": { @@ -484,8 +485,11 @@ def test_pim6_SPT_RPT_path_same_p1(request): shutdown_bringup_interface(tgen, "r3", intf, ifaceaction=False) step("Enable the PIM6 on all the interfaces of r1, r2, r3 and r4 routers") - step("Configure RP on r2 (loopback interface) for the group range {}".\ - format(GROUP_ADDRESS_1)) + step( + "Configure RP on r2 (loopback interface) for the group range {}".format( + GROUP_ADDRESS_1 + ) + ) input_dict = { "r2": { "pim6": { @@ -503,7 +507,9 @@ def test_pim6_SPT_RPT_path_same_p1(request): result = create_pim_config(tgen, TOPO, input_dict) assert result is True, "Testcase {} : Failed Error: {}".format(tc_name, result) - step("Enable MLD on r1 interface and send MLD join {} to R1".format(GROUP_ADDRESS_1)) + step( + "Enable MLD on r1 interface and send MLD join {} to R1".format(GROUP_ADDRESS_1) + ) intf = TOPO["routers"]["r0"]["links"]["r1"]["interface"] intf_ip = TOPO["routers"]["r0"]["links"]["r1"]["ipv6"].split("/")[0] result = socat_send_mld_join( @@ -1084,8 +1090,11 @@ def test_pim6_send_join_on_higher_preffered_rp_p1(request): step("Enable MLD on r1 interface") step("Enable the PIM66 on all the interfaces of r1, r2, r3 and r4 routers") - step("Configure RP on r2 (loopback interface) for the group range {}".\ - format(GROUP_RANGE_4)) + step( + "Configure RP on r2 (loopback interface) for the group range {}".format( + GROUP_RANGE_4 + ) + ) input_dict = { "r2": { "pim6": { @@ -1255,9 +1264,9 @@ def test_pim6_send_join_on_higher_preffered_rp_p1(request): ) assert result is not True, ( "Testcase {} : Failed \n " - "r1: rp-info is present for group {} \n Error: {}".format(tc_name, - GROUP_RANGE_4, - result) + "r1: rp-info is present for group {} \n Error: {}".format( + tc_name, GROUP_RANGE_4, result + ) ) step( diff --git a/tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp2.py b/tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp2.py index a343b6088c..6113635783 100755 --- a/tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp2.py +++ b/tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp2.py @@ -247,6 +247,7 @@ def verify_state_incremented(state_before, state_after): # ##################################################### + def test_pim6_multiple_groups_same_RP_address_p2(request): """ Configure multiple groups (10 grps) with same RP address diff --git a/tests/topotests/multicast_pim_dr_nondr_test/test_pim_dr_nondr_with_ospf_topo2.py b/tests/topotests/multicast_pim_dr_nondr_test/test_pim_dr_nondr_with_ospf_topo2.py index 7136977f74..7034696a8c 100755 --- a/tests/topotests/multicast_pim_dr_nondr_test/test_pim_dr_nondr_with_ospf_topo2.py +++ b/tests/topotests/multicast_pim_dr_nondr_test/test_pim_dr_nondr_with_ospf_topo2.py @@ -916,7 +916,9 @@ def test_configuring_igmp_local_join_on_reciever_dr_non_dr_nodes_p1(request): ) for dut, intf in zip(["r1", "r2"], [intf_r1_s1, intf_r2_s1]): - result = verify_igmp_groups(tgen, dut, intf, IGMP_JOIN_RANGE_3, expected=False) + result = verify_igmp_groups( + tgen, dut, intf, IGMP_JOIN_RANGE_3, expected=False + ) assert result is not True, ( "Testcase {} : Failed \n " "IGMP groups are still present \n Error: {}".format(tc_name, result) diff --git a/tests/topotests/multicast_pim_static_rp_topo1/test_multicast_pim_static_rp1.py b/tests/topotests/multicast_pim_static_rp_topo1/test_multicast_pim_static_rp1.py index b2e7d9845a..dbeaa9b8f9 100755 --- a/tests/topotests/multicast_pim_static_rp_topo1/test_multicast_pim_static_rp1.py +++ b/tests/topotests/multicast_pim_static_rp_topo1/test_multicast_pim_static_rp1.py @@ -1413,8 +1413,6 @@ def test_clear_pim_configuration_p1(request): write_test_footer(tc_name) - - if __name__ == "__main__": ARGS = ["-s"] + sys.argv[1:] sys.exit(pytest.main(ARGS)) diff --git a/tests/topotests/multicast_pim_uplink_topo1/test_multicast_pim_uplink_topo1.py b/tests/topotests/multicast_pim_uplink_topo1/test_multicast_pim_uplink_topo1.py index ec2963da8d..a750c7fdba 100644 --- a/tests/topotests/multicast_pim_uplink_topo1/test_multicast_pim_uplink_topo1.py +++ b/tests/topotests/multicast_pim_uplink_topo1/test_multicast_pim_uplink_topo1.py @@ -345,8 +345,9 @@ def configure_static_routes_for_rp_reachability(tgen, topo): } result = create_static_routes(tgen, static_routes) - assert result is True, "API {} : Failed Error: {}".\ - format(sys._getframe().f_code.co_name, result) + assert result is True, "API {} : Failed Error: {}".format( + sys._getframe().f_code.co_name, result + ) def verify_state_incremented(state_before, state_after): @@ -1662,9 +1663,10 @@ def test_mroutes_updated_correctly_after_source_interface_shut_noshut_p1(request data["oil"], expected=False, ) - assert result is not True, ( - "Testcase {} : Failed " - "Mroute IIF and OIF are same \n Error: {}".format(tc_name, result) + assert ( + result is not True + ), "Testcase {} : Failed " "Mroute IIF and OIF are same \n Error: {}".format( + tc_name, result ) step("Shut and No shut source interface multiple time") @@ -2335,9 +2337,10 @@ def test_mroutes_updated_after_sending_IGMP_prune_and_join_p1(request): data["oil"], expected=False, ) - assert result is not True, ( - "Testcase {} : Failed " - " mroute are still present \n Error: {}".format(tc_name, result) + assert ( + result is not True + ), "Testcase {} : Failed " " mroute are still present \n Error: {}".format( + tc_name, result ) for data in input_dict_sg: @@ -2350,9 +2353,10 @@ def test_mroutes_updated_after_sending_IGMP_prune_and_join_p1(request): data["oil"], expected=False, ) - assert result is not True, ( - "Testcase {} : Failed " - " mroute are still present \n Error: {}".format(tc_name, result) + assert ( + result is not True + ), "Testcase {} : Failed " " mroute are still present \n Error: {}".format( + tc_name, result ) step( @@ -2791,10 +2795,11 @@ def test_mroutes_updated_after_changing_rp_config_p1(request): intf_traffic = topo["routers"]["r4"]["links"]["r3-link1"]["interface"] state_dict = {"r4": {intf_traffic: ["registerStopRx"]}} state_before = verify_pim_interface_traffic(tgen, state_dict) - assert isinstance(state_before, dict), \ - ("Testcase{} : Failed \n state_before is not dictionary \n " - "Error: {}".\ - format(tc_name, result)) + assert isinstance( + state_before, dict + ), "Testcase{} : Failed \n state_before is not dictionary \n " "Error: {}".format( + tc_name, result + ) step("Change the RP to R3 loopback for same group range (225.1.1.1-5)") @@ -2884,10 +2889,11 @@ def test_mroutes_updated_after_changing_rp_config_p1(request): step("Verify pim interface traffic after changing RP") state_after = verify_pim_interface_traffic(tgen, state_dict) - assert isinstance(state_before, dict), \ - ("Testcase{} : Failed \n state_before is not dictionary \n " - "Error: {}".\ - format(tc_name, result)) + assert isinstance( + state_before, dict + ), "Testcase{} : Failed \n state_before is not dictionary \n " "Error: {}".format( + tc_name, result + ) result = verify_state_incremented(state_before, state_after) assert result is True, "Testcase{} : Failed Error: {}".format(tc_name, result) @@ -3281,9 +3287,10 @@ def test_mroutes_after_restart_frr_services_p2(request): data["oil"], expected=False, ) - assert result is not True, ( - "Testcase {}: Failed " - "mroutes are still present \n Error: {}".format(tc_name, result) + assert ( + result is not True + ), "Testcase {}: Failed " "mroutes are still present \n Error: {}".format( + tc_name, result ) step("Stop FRR on R4 node") @@ -3306,9 +3313,10 @@ def test_mroutes_after_restart_frr_services_p2(request): data["oil"], expected=False, ) - assert result is not True, ( - "Testcase {} : Failed " - " Mroutes are still present \n Error: {}".format(tc_name, result) + assert ( + result is not True + ), "Testcase {} : Failed " " Mroutes are still present \n Error: {}".format( + tc_name, result ) step("Start FRR on R4 node") diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_authentication.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_authentication.py index c206923b94..0fe0fd95b0 100644 --- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_authentication.py +++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_authentication.py @@ -93,6 +93,7 @@ TESTCASES = """ + def setup_module(mod): """ Sets up the pytest environment @@ -153,6 +154,7 @@ def teardown_module(mod): # Test cases start here. # ################################## + def test_ospf6_auth_trailer_tc1_md5(request): """ OSPFv3 Authentication Trailer - Verify ospfv3 authentication trailer @@ -229,9 +231,7 @@ def test_ospf6_auth_trailer_tc1_md5(request): tc_name, ospf6_covergence ) - step( - "Disable authentication on R2 " - ) + step("Disable authentication on R2 ") r2_ospf6_auth = { "r2": { @@ -241,7 +241,7 @@ def test_ospf6_auth_trailer_tc1_md5(request): "hash-algo": "md5", "key": "ospf6", "key-id": "10", - "del_action": True + "del_action": True, } } } @@ -397,9 +397,7 @@ def test_ospf6_auth_trailer_tc2_sha256(request): tc_name, ospf6_covergence ) - step( - "Disable authentication on R2 " - ) + step("Disable authentication on R2 ") r2_ospf6_auth = { "r2": { @@ -409,7 +407,7 @@ def test_ospf6_auth_trailer_tc2_sha256(request): "hash-algo": "hmac-sha-256", "key": "ospf6", "key-id": "10", - "del_action": True + "del_action": True, } } } @@ -488,6 +486,7 @@ def test_ospf6_auth_trailer_tc2_sha256(request): write_test_footer(tc_name) + def test_ospf6_auth_trailer_tc3_keychain_md5(request): """ OSPFv3 Authentication Trailer - Verify ospfv3 authentication trailer @@ -579,21 +578,10 @@ def test_ospf6_auth_trailer_tc3_keychain_md5(request): tc_name, ospf6_covergence ) - step( - "Disable authentication on R2 " - ) + step("Disable authentication on R2 ") r2_ospf6_auth = { - "r2": { - "links": { - "r1": { - "ospf6": { - "keychain": "auth", - "del_action": True - } - } - } - } + "r2": {"links": {"r1": {"ospf6": {"keychain": "auth", "del_action": True}}}} } result = config_ospf6_interface(tgen, topo, r2_ospf6_auth) assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result) @@ -666,6 +654,7 @@ def test_ospf6_auth_trailer_tc3_keychain_md5(request): write_test_footer(tc_name) + def test_ospf6_auth_trailer_tc4_keychain_sha256(request): """ OSPFv3 Authentication Trailer - Verify ospfv3 authentication trailer @@ -757,21 +746,10 @@ def test_ospf6_auth_trailer_tc4_keychain_sha256(request): tc_name, ospf6_covergence ) - step( - "Disable authentication on R2 " - ) + step("Disable authentication on R2 ") r2_ospf6_auth = { - "r2": { - "links": { - "r1": { - "ospf6": { - "keychain": "auth", - "del_action": True - } - } - } - } + "r2": {"links": {"r1": {"ospf6": {"keychain": "auth", "del_action": True}}}} } result = config_ospf6_interface(tgen, topo, r2_ospf6_auth) assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result) @@ -844,6 +822,7 @@ def test_ospf6_auth_trailer_tc4_keychain_sha256(request): write_test_footer(tc_name) + def test_ospf6_auth_trailer_tc5_md5_keymissmatch(request): """ OSPFv3 Authentication Trailer - Verify ospfv3 authentication trailer @@ -959,6 +938,7 @@ def test_ospf6_auth_trailer_tc5_md5_keymissmatch(request): write_test_footer(tc_name) + def test_ospf6_auth_trailer_tc6_sha256_mismatch(request): """ OSPFv3 Authentication Trailer - Verify ospfv3 authentication trailer @@ -1069,6 +1049,7 @@ def test_ospf6_auth_trailer_tc6_sha256_mismatch(request): write_test_footer(tc_name) + def test_ospf6_auth_trailer_tc7_keychain_md5_missmatch(request): """ OSPFv3 Authentication Trailer - Verify ospfv3 authentication trailer @@ -1200,6 +1181,7 @@ def test_ospf6_auth_trailer_tc7_keychain_md5_missmatch(request): write_test_footer(tc_name) + def test_ospf6_auth_trailer_tc8_keychain_sha256_missmatch(request): """ OSPFv3 Authentication Trailer - Verify ospfv3 authentication trailer @@ -1331,6 +1313,7 @@ def test_ospf6_auth_trailer_tc8_keychain_sha256_missmatch(request): write_test_footer(tc_name) + def test_ospf6_auth_trailer_tc9_keychain_not_configured(request): """ OSPFv3 Neighborship without Authentication Trailer - @@ -1408,6 +1391,7 @@ def test_ospf6_auth_trailer_tc9_keychain_not_configured(request): write_test_footer(tc_name) + def test_ospf6_auth_trailer_tc10_no_auth_trailer(request): """ OSPFv3 Neighborship without Authentication Trailer - @@ -1437,6 +1421,7 @@ def test_ospf6_auth_trailer_tc10_no_auth_trailer(request): write_test_footer(tc_name) + if __name__ == "__main__": args = ["-s"] + sys.argv[1:] sys.exit(pytest.main(args)) -- cgit v1.2.3