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

[FEATURE] Tests should be able to detect if warnings/errors were logged #2098

Open
peternied opened this issue Sep 22, 2022 · 2 comments
Open
Labels
enhancement New feature or request help wanted Community contributions are especially encouraged for these issues. triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable.

Comments

@peternied
Copy link
Member

Is your feature request related to a problem?
There are many condictions within the security plugin that warn/error on bad configuration or help guide users away from deprecated features. There should be a way to confirm that the warnings/errors were actually fired for users/administrators to see.

What solution would you like?
We could add a mechanism to listen to the logger output and make it available for tests to assert on, this would involve catching this state from running nodes, aggregating it, and supplying for a test in progress. It would be complex to implement in a reliable fashion as it is a similiar scenario to TestAuditlogImpl

What alternatives have you considered?
OpenSearchTestCase has this functionality, and migrating to these base configurations is an option for some test configurations, see
OpenSearchTestCase.java#L506

@peternied peternied added enhancement New feature or request untriaged Require the attention of the repository maintainers and may need to be prioritized labels Sep 22, 2022
@RyanL1997 RyanL1997 removed the untriaged Require the attention of the repository maintainers and may need to be prioritized label Sep 26, 2022
@davidlago davidlago added the triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable. label Oct 10, 2022
@cwperks
Copy link
Member

cwperks commented Feb 20, 2023

[Triage] @peternied Re-surfacing this issue. Are there any tests in particular you can think of that would benefit from this functionality? Can you provide more info to make this issue more actionable or close the issue?

@peternied peternied added the help wanted Community contributions are especially encouraged for these issues. label Feb 21, 2023
@peternied
Copy link
Member Author

@cwperks I don't think we need to make this issue more actionable. If we triaged it, we are saying 'we would accept a change like this into the codebase' - not a commitment to get this work done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Community contributions are especially encouraged for these issues. triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable.
Projects
None yet
Development

No branches or pull requests

4 participants