-
Notifications
You must be signed in to change notification settings - Fork 21
feat: Adds mechanism to generate tests by parsing savedsearches.conf. #228
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
Conversation
harshshah2-crest
commented
Dec 29, 2020
- Mechanism to generate tests by parsing savedsearches.conf.
- Documentation Update.
- Added tests in TA_Fiction and TA_Broken.
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
docs/field_tests.rst
Outdated
| test_savedsearches[<savedsearch_stanza>] | ||
| Test case verifies that there are savedsearches mapped with the search. |
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.
Please update the description. we are not checking the mapping, we are validating that the search produces a result which is mentioned in the saved search
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.
Done.
| caplog, | ||
| ): | ||
| """ | ||
| Tests if all savedsearches in savedsearches.conf are generated in Splunk. |
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.
update the docstring. we are not checking savedsearches are generated. we are testing each saved search is being executed properly and producing results.
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.
Done.
| "dispatch.earliest_time" : "0", | ||
| "dispatch.latest_time" : "now"} | ||
| for key in savedsearch_sections.options: | ||
| if key == "search": |
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.
what happens if search param is not provided in the stanza? the whole execution would stop with an exception.
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.
Updated code to handle such scenarios and also updated tests in TA_Fiction and TA_Broken accordingly.
…arsing savedsearches.conf.
2fd0891 to
8e2584a
Compare
|
Expected release notes (by @harshshah2-crest) features:
|
|
🎉 This PR is included in version 1.4.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |