Skip to content

test : added unit tests for plugin_health_dashboard script helpers#2076

Closed
tmdeveloper007 wants to merge 2 commits into
utksh1:mainfrom
tmdeveloper007:#2071
Closed

test : added unit tests for plugin_health_dashboard script helpers#2076
tmdeveloper007 wants to merge 2 commits into
utksh1:mainfrom
tmdeveloper007:#2071

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Closes #2071.

Summary of What Has Been Done:

Added testing/backend/unit/test_plugin_health_dashboard.py with 14 unit tests covering the four helper functions in scripts/plugin_health_dashboard.py.

Changes Made:

  • safe_relative_path: tests for normal paths, exact match, outside-base (returns absolute), deeply nested
  • discover_plugins: tests for list return, missing parser detection, invalid JSON handling, name sorting, empty directory
  • build_report: tests for summary counts (total/with-parser/without), category aggregation, empty input
  • format_markdown: tests for summary section content, alphabetical category order, plugin table with parser status

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

Impact it Made:

  • Prevents regressions in plugin health reporting
  • Validates markdown output format for maintainer dashboards
  • Ensures discover_plugins correctly categorizes 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 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 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.

This branch includes the unrelated catalog-test PR beneath it and fails backend-unit. Please rebase independently onto main, keep only plugin-health dashboard tests, and fix CI.

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 plugin_health_dashboard script helpers

2 participants