-
Notifications
You must be signed in to change notification settings - Fork 4
[test] add more tests for the gitMatchingGroup step #671
[test] add more tests for the gitMatchingGroup step #671
Conversation
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.
I'd try to use a name explaining the corner case, adding the PR id in a Java comment, then the method would be self-explanatory
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.
I've decided to use a more meaningful test case name, since the cornercase might be misleading
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.
i.e. : test_multiple_groups_with_multiple_modules_does_not_capture_module
It's more verbose but clearer IMO.
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.
I think this use case is almost the same than the above ones, as the exclude pattern includes a subdirectory. I would name it then: test_module_detection_with_path_in_pattern
What does this PR do?
Add some test cases to validate a multimodule beat with some exclusions.
Why is it important?
Avoid the corner case of detecting a quite generic regex that should not apply for another beats
Related issues
Caused by elastic/beats#19985 and therefore elastic/beats#19986