Skip to content

Commit

Permalink
Fix IndexError: Bad index 'None' type in fixture check_dut_asic_type (#…
Browse files Browse the repository at this point in the history
…14075)

What is the motivation for this PR?
Due to #12824, rand_one_dut_hostname is None in fixture check_dut_asic_type
It throws failed on setup with "IndexError: Bad index 'None' type " in test case test_ecmp_hash_seed_value

How did you do it?
Use rand_one_dut_front_end_hostname in stead of rand_one_dut_hostname

How did you verify/test it?
Run PR test case and test_ecmp_hash_seed_value
  • Loading branch information
ZhaohuiS authored and mssonicbld committed Oct 10, 2024
1 parent 30b9b78 commit 78c6e03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/common/plugins/custom_fixtures/check_dut_asic_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@


@pytest.fixture(scope="function")
def check_dut_asic_type(request, duthosts, rand_one_dut_hostname):
duthost = duthosts[rand_one_dut_hostname]
def check_dut_asic_type(request, duthosts, rand_one_dut_front_end_hostname):
duthost = duthosts[rand_one_dut_front_end_hostname]
asic_marks = [mark for mark in request.node.iter_markers(name="asic")]
if not asic_marks:
return
Expand Down

0 comments on commit 78c6e03

Please sign in to comment.