Skip to content

test : added unit tests for validate_plugins_catalog script helpers#2075

Closed
tmdeveloper007 wants to merge 1 commit into
utksh1:mainfrom
tmdeveloper007:#2070
Closed

test : added unit tests for validate_plugins_catalog script helpers#2075
tmdeveloper007 wants to merge 1 commit into
utksh1:mainfrom
tmdeveloper007:#2070

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Closes #2070.

Summary of What Has Been Done:

Added testing/backend/unit/test_validate_plugins_catalog.py with 11 unit tests covering the four helper functions in scripts/validate_plugins_catalog.py.

Changes Made:

  • parse_plugins_md: tests for plugin entry extraction from markdown table, header row skipping, empty file handling
  • extract_counts_from_catalog: tests for "At a Glance" count extraction (total, safe, intrusive, exploit)
  • extract_category_counts_from_catalog: tests for category table parsing and stopping at next section header
  • validate_catalog: tests for in-sync (True, empty issues), missing from catalog, extra in catalog, count mismatch cases

All tests use tempfile.TemporaryDirectory for fixture data. Tests pass with python3 -m pytest --noconftest.

Impact it Made:

  • Validates the CI catalog validation script itself, preventing silent breakage
  • Catches regressions in regex patterns for markdown table parsing
  • Improves confidence when adding or renaming plugins

Note: This task is being handled by tmdeveloper007 — please assign to that account when picking it up.

@utksh1

utksh1 commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Closing as superseded by #2079, whose branch already contains this commit. Please avoid stacked duplicate PRs; keep one focused branch per reviewable change.

@utksh1 utksh1 closed this Jul 24, 2026
@utksh1 utksh1 added the gssoc:invalid Admin validation: invalid for GSSoC scoring label Jul 24, 2026
@utksh1 utksh1 added level:beginner 20 pts difficulty label for small beginner-friendly PRs type:testing Testing work category bonus label area:ci CI, tooling, or automation work labels Jul 24, 2026

@utksh1 utksh1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

The catalog helper coverage is a reasonable direction, but the branch fails backend-unit and has no linked assigned issue. Please add a focused issue reference, remove redundant parser-format assertions where existing CI already covers them, and fix the suite before re-review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI, tooling, or automation work gssoc:invalid Admin validation: invalid for GSSoC scoring level:beginner 20 pts difficulty label for small beginner-friendly PRs type:testing Testing work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test : add unit tests for validate_plugins_catalog script helpers

2 participants