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

Changing the DPB fixure to get breakout cfg table #1151

Closed
wants to merge 1 commit into from

Conversation

samaity
Copy link
Contributor

@samaity samaity commented Dec 14, 2019

Signed-off-by: Sangita Maity sangitamaity0211@gmail.com

What I did
Generating "BREAKOUT_CFG" table in config DB for running DPB test case.

Why I did it

This PR is needed for DPB TEST PR

How to verify it
Verified using VS test case mentioned here

samaity@server09:~/REPO_FACTORY/GIT_REPO/DPB/sonic-buildimage/platform/vs/tests/breakout$ sudo pytest -s -v --dvsname=vs-sang test_breakout_cli.py
========================================================================================= test session starts =========================================================================================
platform linux2 -- Python 2.7.15+, pytest-3.3.0, py-1.8.0, pluggy-0.6.0 -- /usr/bin/python
cachedir: .cache
rootdir: /home/samaity/REPO_FACTORY/GIT_REPO/DPB/sonic-buildimage/platform/vs/tests/breakout, inifile:
collected 2 items

test_breakout_cli.py::TestBreakoutCli::test_InitialBreakoutMode remove extra link dummy
PASSED                                                                                      [ 50%]
test_breakout_cli.py::TestBreakoutCli::test_mode_1X100G **** Breakout Cli test Starts ****
**** 1X100G --> 2x50G passed ****
**** 2x50G --> 1x100G[40G] passed ****
**** 1X100G --> 4x25G[10G] passed ****
**** 4x25G[10G] --> 1x100G[40G] passed ****
**** 1x100G[40G] --> 2x25G(2)+1x50G(2) passed ****
**** 2x25G(2)+1x50G(2) --> 1x100G[40G] passed ****
**** 1x100G[40G] --> 1x50G(2)+2x25G(2)  passed ****
**** 1x50G(2)+2x25G(2) --> 1x100G[40G] passed ****
**** 1x100G[40G] --> 2x50G  passed ****
**** 2x50G --> 2x25G(2)+1x50G(2)  passed ****
**** 1x50G(2)+2x25G(2) --> 2x25G(2)+1x50G(2)  passed ****
**** 2x25G(2)+1x50G(2)  --> 1x100G[40G]  passed ****
PASSED                                                                                      [100%]

Signed-off-by: Sangita Maity <sangitamaity0211@gmail.com>
@samaity samaity changed the title Changing the DPB fixure to get breakout cfg table (#17) Changing the DPB fixure to get breakout cfg table Dec 14, 2019
@samaity samaity marked this pull request as ready for review December 14, 2019 20:48
@lguohan
Copy link
Contributor

lguohan commented Jan 29, 2020

retest this please


@pytest.yield_fixture(scope="module")
def dpb_setup_fixture(dvs):
create_dpb_config_file(dvs)
Copy link
Contributor

Choose a reason for hiding this comment

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

Newer pytest versions don't allow you to directly call fixtures like this. I would recommend converting create_dpb_config_file and remove... into normal methods if they're not used anywhere else, otherwise you might want to define a helper method that can be used in both these fixtures and the dpb_setup_fixture.

Copy link
Contributor

@daall daall left a comment

Choose a reason for hiding this comment

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

Hey @samaity @zhenggen-xu it looks like this was added already in #1112. Can you confirm?

My comment about calling the fixture directly still applies in this case. You can fix the merge conflicts in this PR and address the comment here, or it might be easier to close this PR and open a new PR against the latest master. Up to you, just let me know what you end up choosing! :)

@samaity
Copy link
Contributor Author

samaity commented May 20, 2020

@daall Yes, you are right. I am closing the PR. PR#1112 has the code and it's already merged 👍

@samaity samaity closed this May 20, 2020
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
sonic-net#1151)

To ensure a smooth transition once we stop installing the dependencies explicitly in the SONiC image.

We can upgrade dependencies selectively in the future.

Also had to replace single-quotes with double-quotes in expected Click error messages, as it seems the Click package installed via pip uses double quotes, whereas the package installed via Debian used single-quotes.
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.

3 participants