Skip to content

Commit

Permalink
[M0/Mx] Fix test_route_flap (sonic-net#15641)
Browse files Browse the repository at this point in the history
PR sonic-net#14804 caused test_route_flap fail on M0/Mx with below error:

>       pytest.fail("Did not find a dut in duthosts that for topo type {} that has upstream nbr type {}".
                    format(tbinfo["topo"]["type"], upstream_nbr_type))
E       Failed: Did not find a dut in duthosts that for topo type m0 that has upstream nbr type T3

What is the motivation for this PR?
Fix test_route_flap on M0/Mx topo.

How did you do it?
Support upstream neighbor on M0/Mx.

How did you verify/test it?
Verified on Nokia-7215 M0.
Verified on Arista-720DT M0.
  • Loading branch information
lizhijianrd authored Nov 21, 2024
1 parent 1f2e6d6 commit ea1108a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1875,7 +1875,11 @@ def enum_rand_one_frontend_asic_index(request):

@pytest.fixture(scope='module')
def enum_upstream_dut_hostname(duthosts, tbinfo):
if tbinfo["topo"]["type"] == "t0":
if tbinfo["topo"]["type"] == "m0":
upstream_nbr_type = "M1"
elif tbinfo["topo"]["type"] == "mx":
upstream_nbr_type = "M0"
elif tbinfo["topo"]["type"] == "t0":
upstream_nbr_type = "T1"
elif tbinfo["topo"]["type"] == "t1":
upstream_nbr_type = "T2"
Expand Down

0 comments on commit ea1108a

Please sign in to comment.