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] AuditMessage validation in tests should be more useful / removed #2188

Closed
peternied opened this issue Oct 24, 2022 · 1 comment
Closed
Labels
enhancement New feature or request good first issue These are recommended starting points for newcomers looking to make their first contributions. 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?
Test code was written to verify the format of audit log messages. This code is clunky as in tests it's written as Assert.assertTrue(validateMsgs(messages));. It would be far more useful if it emitted errors about why the message(s) are invalid rather than asserting false.

Furthermore; It is not clear that the message format level validation in the integration tests is useful, so we should investigate under what conditions we are testing for/against.

Code in question

protected boolean validateMsgs(final Collection<AuditMessage> msgs) {

What solution would you like?
We should have assertions that clearly indicate what is wrong so the failure message can be instructive to developers diagnosing the tests, or we should remove this functionality if it isn't providing valid to our test cases.

@peternied peternied added enhancement New feature or request untriaged Require the attention of the repository maintainers and may need to be prioritized labels Oct 24, 2022
@stephen-crawford
Copy link
Contributor

[TRIAGE] Moved to backlog and good first issue applied.

@stephen-crawford stephen-crawford added good first issue These are recommended starting points for newcomers looking to make their first contributions. hacktoberfest Global event that encourages people to contribute to open-source. triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable. and removed untriaged Require the attention of the repository maintainers and may need to be prioritized labels Oct 24, 2022
@davidlago davidlago removed the hacktoberfest Global event that encourages people to contribute to open-source. label Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue These are recommended starting points for newcomers looking to make their first contributions. triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable.
Projects
None yet
Development

No branches or pull requests

3 participants