Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix conftest rand_one_dut_hostname IndexError #14830

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dayouliu1
Copy link
Contributor

@dayouliu1 dayouliu1 commented Oct 2, 2024

Description of PR

Summary:
Fixes #14829

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

Fix issue where rand_one_dut_hostname fixture was not being properly set when the fixture is loaded dynamically, like in the case for ecmp/test_ecmp_hash_seed_value. The custom_fixture plugin will dynamically add rand_one_dut_hostname, but the current method of setting rand_one_dut_hostname_var does not account for this and so it is not set.

How did you do it?

Set the global variable within the rand_one_dut_hostname fixture directly.

How did you verify/test it?

Ran and verified test suite

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

Updated the rand_one_dut_hostname and selected_rand_dut fixtures to
set rand_one_dut_hostname_var whenever needed, specifically in the case
the fixture is dynamically loaded. Removed old method of setting
rand_one_dut_hostname_var.
@dayouliu1 dayouliu1 force-pushed the fix-conftest-rand-one-dut-hostname branch from bca7793 to ef073b7 Compare October 2, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: test_ecmp_hash_seed_value test fails with IndexError
1 participant