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
SUMO-111064 Add unit test for events plugin #63
Conversation
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.
Overall LGTM, thanks Yuting! Left a few minor comments
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.
These are very good test cases for happy paths. Can you add some test cases for things like an invalid type_selector array, or an ERROR
type event that says the supplied RV is expired (and making sure that event is not ingested)? It is always important to test if the component has good error handling.
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.
Just noticed we're doing assert_equal actual, expected
, but I believe the ordering should be assert_equal expected, actual
or the test failure message will display the message incorrectly
@samjsong you are right. I think in some of our other test files ( |
Good catch, I think we can fix those in another PR :) |
* Add ftp collectors * Update collectors.tf
Add unit tests for events plugin:
ADDED
andMODIFIED
. Customers can also decidetype_selector
by configuration to decide whetherDELETED
is also selected