Skip to content

Fix test_route_flow_counter#9958

Merged
StormLiangMS merged 1 commit intosonic-net:masterfrom
andywongarista:master-fix-route-flow-counter
Sep 16, 2023
Merged

Fix test_route_flow_counter#9958
StormLiangMS merged 1 commit intosonic-net:masterfrom
andywongarista:master-fix-route-flow-counter

Conversation

@andywongarista
Copy link
Copy Markdown
Contributor

@andywongarista andywongarista commented Sep 12, 2023

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

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.
Copy link
Copy Markdown
Collaborator

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StormLiangMS StormLiangMS merged commit b521229 into sonic-net:master Sep 16, 2023
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Oct 24, 2023
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 pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Oct 24, 2023
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
Copy Markdown
Collaborator

Cherry-pick PR to 202205: #10455

@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202305: #10456

mssonicbld pushed a commit that referenced this pull request Oct 25, 2023
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 pushed a commit that referenced this pull request Oct 25, 2023
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
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Jan 25, 2024
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
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.

4 participants