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

[debug dump] Refactoring Modules and Unit Tests #1943

Merged
merged 2 commits into from
Nov 30, 2021

Conversation

vivekrnv
Copy link
Contributor

What I did

  1. Moved the "populate_mock" method to dump/helper.py i.e. common to all the tests
  2. Moved the "add_to_ret_template" to Executor class i.e. common across all the modules.

How I did it

How to verify it

Unit Tests's:

vkarri@96050efd4f16:/sonic/src/sonic-utilities$ pytest-3 tests/dump_tests/ 
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.9.2, pytest-6.0.2, py-1.10.0, pluggy-0.13.0
rootdir: /sonic/src/sonic-utilities/tests, configfile: pytest.ini
plugins: pyfakefs-4.5.3, cov-2.10.1
collected 116 items                                                                                                                                                        

tests/dump_tests/dump_state_test.py .............                                                                                                                    [ 11%]
tests/dump_tests/match_engine_test.py ...............................                                                                                                [ 37%]
tests/dump_tests/module_tests/copp_test.py ..........                                                                                                                [ 46%]
tests/dump_tests/module_tests/evpn_test.py ......                                                                                                                    [ 51%]
tests/dump_tests/module_tests/port_test.py ......                                                                                                                    [ 56%]
tests/dump_tests/module_tests/portchannel_member_test.py ...                                                                                                         [ 59%]
tests/dump_tests/module_tests/portchannel_test.py ....                                                                                                               [ 62%]
tests/dump_tests/module_tests/route_test.py ..........                                                                                                               [ 71%]
tests/dump_tests/module_tests/vlan_test.py .....................                                                                                                     [ 89%]
tests/dump_tests/module_tests/vxlan_tunnel_map_test.py .....                                                                                                         [ 93%]
tests/dump_tests/module_tests/vxlan_tunnel_test.py .......                                                                                                           [100%]

=========================================================================== 116 passed in 1.21s ============================================================================

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

Signed-off-by: Vivek Reddy Karri <[email protected]>
@vivekrnv
Copy link
Contributor Author

@SuvarnaMeenakshi, Can you help review

@dgsudharsan
Copy link
Collaborator

@SuvarnaMeenakshi Your code review comments are handled here. Can you please review and signoff?

Copy link
Contributor

@SuvarnaMeenakshi SuvarnaMeenakshi left a comment

Choose a reason for hiding this comment

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

lgtm

@SuvarnaMeenakshi SuvarnaMeenakshi merged commit 4e132c1 into sonic-net:master Nov 30, 2021
@vivekrnv vivekrnv deleted the debug_dump_refactoring branch December 6, 2021 17:00
abdosi pushed a commit that referenced this pull request Dec 8, 2021
What I did
Moved the "populate_mock" method to dump/helper.py i.e. common to all the tests
Moved the "add_to_ret_template" to Executor class i.e. common across all the modules.
How I did it
How to verify it
Unit Tests's:
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