Skip to content

test(logfiles): add unit tests for ignore rules - #3570

Merged
mkoura merged 1 commit into
masterfrom
logfiles_unit_tests
Jul 30, 2026
Merged

test(logfiles): add unit tests for ignore rules#3570
mkoura merged 1 commit into
masterfrom
logfiles_unit_tests

Conversation

@mkoura

@mkoura mkoura commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Cover the add_ignore_rule -> _get_ignore_rules round trip with ";;" inside the regex (locks in commit 3bf1d5c), rule expiry semantics including the expiry boundary, skipping of lines without the ";;" separator, appending rules to the same ignore file, collection from multiple ignore files, cleanup by ignore file id and combining of ignore regexes for a log file (including the empty regex match-everything hazard).

Cover the add_ignore_rule -> _get_ignore_rules round trip with ";;"
inside the regex (locks in commit 3bf1d5c), rule expiry semantics
including the expiry boundary, skipping of lines without the ";;"
separator, appending rules to the same ignore file, collection from
multiple ignore files, cleanup by ignore file id and combining of
ignore regexes for a log file (including the empty regex
match-everything hazard).
@mkoura
mkoura requested a review from saratomaz as a code owner July 30, 2026 09:54
@mkoura
mkoura requested review from Copilot and removed request for saratomaz July 30, 2026 09:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a focused unit-test suite to validate cardano_node_tests.utils.logfiles ignore-rule behavior, ensuring rule file parsing, expiry semantics, and regex-combination edge cases stay stable across future changes.

Changes:

  • Adds round-trip tests for add_ignore_rule()_get_ignore_rules() including embedded ";;" handling and “skip lines without separator” behavior.
  • Adds expiry-boundary tests for ignore rules (0 < skip_after < timestamp semantics) and cleanup coverage via clean_ignore_rules().
  • Adds tests for _get_ignore_regex() combining logic (glob matching, deduplication, multi-regex alternation) including the empty-regex match-everything hazard.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mkoura
mkoura merged commit 2e66a0e into master Jul 30, 2026
4 checks passed
@mkoura
mkoura deleted the logfiles_unit_tests branch July 30, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants