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

[dualtor] Add demo test template for active-active cable type #5424

Merged
merged 2 commits into from
Apr 7, 2022

Conversation

lolyu
Copy link
Contributor

@lolyu lolyu commented Mar 29, 2022

Description of PR

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012

Approach

What is the motivation for this PR?

Modify testcase test_normal_op.py::test_normal_op_upstream to support parameterization based on cable type(active-active or active-standby).
This PR acts as a roadmap on how to support cable type parameterization further for all dualtor_io testcases.

Signed-off-by: Longxiang Lyu lolv@microsoft.com

How did you do it?

  1. Add parameterization fixture cable_type.
  2. Let existing fixtures for dualtor active-standby selects ports in active-standby cable type to test.
  3. List out the basic APIs for active-active tests control/data plane fixtures.

How did you verify/test it?

Run the test test_normal_op.py::test_normal_op_upstream:

dualtor_io/test_normal_op.py::test_normal_op_upstream[active-standby] PASSED                                                                                                                                                                                           [ 33%]
dualtor_io/test_normal_op.py::test_normal_op_downstream_active[active-standby] PASSED                                                                                                                                                                                  [ 66%]
dualtor_io/test_normal_op.py::test_normal_op_downstream_standby[active-standby] PASSED                                                                                                                                                                                 [100%]

Any platform specific information?

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

Documentation

Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
@lolyu lolyu requested a review from a team as a code owner March 29, 2022 10:02
@lgtm-com
Copy link

lgtm-com bot commented Mar 29, 2022

This pull request introduces 5 alerts when merging 51e337e into 155af03 - view on LGTM.com

new alerts:

  • 5 for Unused import

Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented Mar 30, 2022

This pull request introduces 5 alerts when merging 256c9bd into 155af03 - view on LGTM.com

new alerts:

  • 5 for Unused import

Copy link
Contributor

@zjswhhh zjswhhh left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@lolyu lolyu merged commit dc8b9a7 into sonic-net:master Apr 7, 2022
lolyu added a commit that referenced this pull request Apr 8, 2022
lolyu added a commit that referenced this pull request Apr 8, 2022
zjswhhh pushed a commit to zjswhhh/sonic-mgmt that referenced this pull request Apr 20, 2022
…c-net#5424)

Approach
What is the motivation for this PR?
Modify testcase test_normal_op.py::test_normal_op_upstream to support parameterization based on cable type(active-active or active-standby).
This PR acts as a roadmap on how to support cable type parameterization further for all dualtor_io testcases.

Signed-off-by: Longxiang Lyu lolv@microsoft.com

How did you do it?
1. Add parameterization fixture cable_type.
2. Let existing fixtures for dualtor active-standby selects ports in active-standby cable type to test.
3. List out the basic APIs for active-active tests control/data plane fixtures.

How did you verify/test it?
Run the test test_normal_op.py::test_normal_op_upstream:
zjswhhh added a commit that referenced this pull request May 18, 2022
… type (#5545)

### Description of PR
Summary:
Fixes # (issue)

Submitting this PR to re-add test template for `active-active` cable type. The change (#5424) was reverted earlier due to regression.  

sign-off: Jing Zhang zhangjing@microsoft.com 

### Type of change
- [x] Test case(new/improvement)

#### What is the motivation for this PR?
Re-add the roadmap for supporting `active-active` dualtor_io testcases.

#### How did you do it?
1. Pick the commit from the original PR. 
2. Import `cable_type` fixture where the modified fixtures are requested. 
3. Update `data_plane_utils.py` to re-use `DualtorIO` object. 

#### How did you verify/test it?
Tested `test_normal_op` and `test_link_failure`, all passed.
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.

2 participants