-
Notifications
You must be signed in to change notification settings - Fork 558
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
[mock_tests] Add Sflow Orch UTs #2295
[mock_tests] Add Sflow Orch UTs #2295
Conversation
@dgsudharsan could you please help to review ? |
} | ||
|
||
private: | ||
void initSaiApi() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe many APIs here are duplicated and may be common across multiple tests https://github.com/Azure/sonic-swss/blob/40316f7189486f2541ca3e163f746946a62f55a1/tests/mock_tests/copporch_ut.cpp. Can we reorganize and reorganize the code to a common parent class and reuse?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you propose to create common parent class and use it for all tests in mock_tests directory?
It sounds like a really good idea, but it looks like a separate task that is not in scope of these changes.
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a few cases for notifications coming from APP_SFLOW_SESSION_TABLE_NAME & APP_SFLOW_SAMPLE_RATE_TABLE_NAME tables?
Here is a reference on testing if sai api's are called as expected: https://github.com/Azure/sonic-swss/blob/master/tests/mock_tests/portsorch_ut.cpp#L92
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vivekreddynv primary goal of this PR is to add basic infrastructure for sflow orcagent test during Quality Week.
I have expected that tests will be added by someone else :)
Do you think we can invest more time and improve orcagent coverage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the scope though
But i agree, the test can certainly be improved later on demand.
@vadymhlushko-mlnx coulld you please review review comments? |
@ayurkiv-nvda will handle comments since it is his PR |
Signed-off-by: Andriy Yurkiv <[email protected]>
958fed0
to
e655349
Compare
@vivekreddynv can we move forward with the merge? |
yes, i'll approve the PR |
2022-06-24 93af69c: [PFC_WD] Avoid applying ZeroBuffer Profiles to ingress PG when a PFC storm is detected (sonic-net/sonic-swss#2304) 2022-06-24 37349cf: [swssconfig] Optimize performance of swssconfig (sonic-net/sonic-swss#2336) 2022-06-24 84e9b07: [fdborch] fix heap-use-after-free in clearFdbEntry() (sonic-net/sonic-swss#2353) 2022-06-24 1b8bd94: Create ACL table fails due to incorrect check for supported ACL actions #11235 (sonic-net/sonic-swss#2351) 2022-06-24 1ed0b4b: [macsec] Refactor the logic of macsec name map (sonic-net/sonic-swss#2348) 2022-06-23 f88f992: [mock_tests] Add Sflow Orch UTs (sonic-net/sonic-swss#2295) 2022-06-23 ec57bf1: [macsec] Update macsec flex counter (sonic-net/sonic-swss#2338) 2022-06-22 6e0fc85: [ACL] Support stage particular match fields (sonic-net/sonic-swss#2341) 2022-06-22 efb4530: [orchagent, DTel]: report session support to set user vrf (sonic-net/sonic-swss#2326) 2022-06-22 d82874d: Fix for "orchagent crashed when trying to delete fdb static entry with swssconfig #11046" (sonic-net/sonic-swss#2332) 2022-06-22 0c789e6: Fix qos map test in vs test (sonic-net/sonic-swss#2343) 2022-06-17 1bb5070: Enhance mock test for dynamic buffer manager for port removing and qos reload flows (sonic-net/sonic-swss#2262) 2022-06-16 700492f: [aclorch] Fix and simplify DTel watchlist tables and entries (sonic-net/sonic-swss#2155)
- What I did Added Sflow gtest - Why I did it Improve sflow orcagent coverage - How I verified it ayurkiv@487e531606e9:/sonic/src/sonic-swss/tests/mock_tests$ ./tests --gtest_filter=SflowOrchTest* Running main() from /build/googletest-YnT0O3/googletest-1.10.0.20201025/googletest/src/gtest_main.cc Note: Google Test filter = SflowOrchTest* [==========] Running 2 tests from 1 test suite. [----------] Global test environment set-up. [----------] 2 tests from SflowOrchTest [ RUN ] SflowOrchTest.SflowEnableDisable [ OK ] SflowOrchTest.SflowEnableDisable (46 ms) [ RUN ] SflowOrchTest.SflowCreateDelete [ OK ] SflowOrchTest.SflowCreateDelete (46 ms) [----------] 2 tests from SflowOrchTest (92 ms total) [----------] Global test environment tear-down [==========] 2 tests from 1 test suite ran. (93 ms total) [ PASSED ] 2 tests. Signed-off-by: Andriy Yurkiv <[email protected]>
Signed-off-by: Andriy Yurkiv [email protected]
What I did
Added Sflow gtest
Why I did it
Improve sflow orcagent coverage
How I verified it
Details if related