Skip to content

[action] [PR:9958] Fix test_route_flow_counter#10456

Merged
mssonicbld merged 1 commit intosonic-net:202305from
mssonicbld:cherry/202305/9958
Oct 25, 2023
Merged

[action] [PR:9958] Fix test_route_flow_counter#10456
mssonicbld merged 1 commit intosonic-net:202305from
mssonicbld:cherry/202305/9958

Conversation

@mssonicbld
Copy link
Collaborator

Description of PR

Summary: Fix test_route_flow_counter when ran on unsupported platforms
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205
  • 202305

Approach

What is the motivation for this PR?

When test_route_flow_counter is ran on unsupported platform, it fails due to clear_route_flow_counter fixture running which assumes that platform is supported.

Independent pytest fixtures can run even if one causes the test function to skip. The clear_route_flow_counter fixture should not run if the test is skipped (due to lack of support) so the appropriate fixture arg should be included to mark the dependency.

How did you do it?

Added skip_if_not_supported as a dependency of clear_route_flow_counter. By doing this, if test is skipped because there is a lack of support then clear_route_flow_counter will not run.

How did you verify/test it?

Verified that test is skipped on unsupported platform

Any platform specific information?

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

Documentation

What is the motivation for this PR?
When test_route_flow_counter is ran on unsupported platform, it fails due to clear_route_flow_counter fixture running which assumes that platform is supported.

Independent pytest fixtures can run even if one causes the test function to skip. The clear_route_flow_counter fixture should not run if the test is skipped (due to lack of support) so the appropriate fixture arg should be included to mark the dependency.

How did you do it?
Added skip_if_not_supported as a dependency of clear_route_flow_counter. By doing this, if test is skipped because there is a lack of support then clear_route_flow_counter will not run.

How did you verify/test it?
Verified that test is skipped on unsupported platform
@mssonicbld
Copy link
Collaborator Author

Original PR: #9958

@mssonicbld mssonicbld merged commit ffc8861 into sonic-net:202305 Oct 25, 2023
@mssonicbld mssonicbld deleted the cherry/202305/9958 branch February 4, 2024 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants