Skip to content

Conversation

@harshshah2-crest
Copy link
Contributor

  • Mechanism to generate tests by parsing savedsearches.conf.
  • Documentation Update.
  • Added tests in TA_Fiction and TA_Broken.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 29, 2020

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@harshshah2-crest
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@harshshah2-crest harshshah2-crest marked this pull request as ready for review December 29, 2020 13:27
@harshshah2-crest harshshah2-crest marked this pull request as draft December 29, 2020 13:32
@harshshah2-crest harshshah2-crest marked this pull request as ready for review December 30, 2020 05:22
test_savedsearches[<savedsearch_stanza>]
Test case verifies that there are savedsearches mapped with the search.
Copy link
Contributor

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

Copy link
Contributor Author

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.
Copy link
Contributor

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.

Copy link
Contributor Author

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":
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@harshshah2-crest harshshah2-crest force-pushed the feature/savedsearch-tests branch from 2fd0891 to 8e2584a Compare January 5, 2021 05:45
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2021

Expected release notes (by @harshshah2-crest)

features:
Adds mechanism to generate tests to validate savedsearches by parsing savedsearches.conf. (8e2584a)

  • I hereby acknowledge these release notes are 🥙 AWESOME 🥙

@harshshah2-crest harshshah2-crest merged commit e4df4d6 into main Jan 5, 2021
@harshshah2-crest harshshah2-crest deleted the feature/savedsearch-tests branch January 5, 2021 11:58
@github-actions github-actions bot locked and limited conversation to collaborators Jan 5, 2021
@ryanfaircloth
Copy link
Contributor

🎉 This PR is included in version 1.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants