Skip to content

[conftest]: Enforce strict order for enhance_inventory fixture#2878

Merged
wangxin merged 1 commit intosonic-net:masterfrom
theasianpianist:order-enhance-inventory
Jan 28, 2021
Merged

[conftest]: Enforce strict order for enhance_inventory fixture#2878
wangxin merged 1 commit intosonic-net:masterfrom
theasianpianist:order-enhance-inventory

Conversation

@theasianpianist
Copy link
Copy Markdown
Contributor

@theasianpianist theasianpianist commented Jan 27, 2021

Signed-off-by: Lawrence Lee lawlee@microsoft.com

Description of PR

Summary:
Fixes # (issue)

Type of change

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

Approach

What is the motivation for this PR?

It is possible for session level fixtures with autouse=True to run before enhance_inventory. If this happens, and these fixtures are dependent on the duthosts fixture, inventory files may not be properly parsed.

How did you do it?

Make duthosts dependent on enhance_inventory to make sure that inventory files are always properly parsed before attempting to initialize Ansible inventory.

How did you verify/test it?

Any platform specific information?

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

Documentation

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
@theasianpianist
Copy link
Copy Markdown
Contributor Author

retest vsimage please

1 similar comment
@theasianpianist
Copy link
Copy Markdown
Contributor Author

retest vsimage please

@wangxin wangxin merged commit 7fc42e9 into sonic-net:master Jan 28, 2021
@theasianpianist theasianpianist deleted the order-enhance-inventory branch May 13, 2021 22:52
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.

3 participants