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 #941

Closed
wants to merge 2 commits into from
Closed

[intfsorch]: Add unit test with gtest #941

wants to merge 2 commits 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 function calls to ut_helper

* Add test cases for intfsorch.cpp

* 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 function calls to ut_helper
@msftclas
Copy link

msftclas commented Jun 19, 2019

CLA assistant check
All CLA requirements met.

Remove test cases Interfaces_Overlapped_Ip_Addresses and Interfaces_Conflict_Ip_Address
@stcheng
Copy link
Contributor

stcheng commented Jun 21, 2019

hold this PR
we need to separate the vs tests with mock tests that requires SAI

@lguohan
Copy link
Contributor

lguohan commented Jun 24, 2019

@stcheng, can you elaborate the reason? what do you mean by "separate the vs tests with mock tests that requires SAI".

@stcheng
Copy link
Contributor

stcheng commented Jun 27, 2019

@lguohan @shikenghua please check #950

@shikenghua
Copy link
Contributor Author

@stcheng @lguohan submitted a new PR #971. Will close this one.

@stcheng
Copy link
Contributor

stcheng commented Jul 11, 2019

thanks!

@stcheng stcheng closed this Jul 16, 2019
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
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