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

[intfsorch]: Add unit test with gtest #971

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[intfsorch]: Add unit test with gtest #971

wants to merge 1 commit into from

Conversation

shikenghua
Copy link
Contributor

What I did
Add unit test for intfsorch with gtest

Why I did it
This is a follow-up work of adding unit test for sonic-swss after aclorch

How I verified it
Build and run the tests. Verified that all newly added test cases and influenced old test cases are passed.

Details if related
Add test cases in intfsorch_ut.cpp.

  • Either call doTask() to simulate applDB changes or call public functions directly
  • Verify with data stored in intfsorch and/or SAI

Also modify aclorch_ut.cpp according to the following changes:

  • Move common extern declarations to mock_orchagent_main.h
  • Move consumer->addToSync() wrapper function to portal.h
  • Move SAI initialize/uninitialize functions to ut_helper

* Add test cases for intfsorch.cpp

* Also modify aclorch_ut.cpp according to the following changes

* Move common extern declarations to mock_orchagent_main.h

* Move consumer->addToSync() wrapper function to portal.h

* Move SAI initialize/uninitialize functions to ut_helper
@shikenghua
Copy link
Contributor Author

retest this please

@stcheng stcheng self-requested a review July 18, 2019 21:32
@lguohan
Copy link
Contributor

lguohan commented Oct 29, 2019

retest this please

@qiluo-msft
Copy link
Contributor

Please help rebase it to latest master, and I have some patch for you, which build the subdir, and test it during build process.

0001-Fix-mock_tests-build.patch.txt

EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
* Add 'show' CLI for system-health feature

Signed-off-by: Shlomi Bitton <shlomibi@mellanox.com>

* Add unit test for 'system-health' feature, add support for testing in 'show' script, Fix comments

Signed-off-by: Shlomi Bitton <shlomibi@mellanox.com>

* Fix additional comments

* Fix comments

* Update Command-Reference.md

Add a CLI reference for system-health feature.

* Fix LGTM alerts

* Fix comment

Change 'Ignore' to 'Ignored'

* Update Command-Reference.md

Fix example output

* Update Command-Reference.md

* Change 'summary' output and adapt test and reference to the new change

* Update main.py

* Fix multiline output for expected output

* keep output aligned

* Fix import for unit testing after community change

* Add clicommon for @cli.group after community change

* Align changes in the feature to the CLI on commit
sonic-net/sonic-buildimage@8ea2ab5

Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com>

* Update main.py

* Move new group CLI into a separate file

* Organize imports per PEP8 standards

* Organize imports per PEP8 standards

* Reformat docstring for readability
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