Skip to content

[FEATURE] AuditMessage validation in tests should be more useful / removed #2188

@peternied

Description

@peternied

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueThese are recommended starting points for newcomers looking to make their first contributions.triagedIssues labeled as 'Triaged' have been reviewed and are deemed actionable.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions