Skip to content

Add unit tests for scripts in kgateway.dev/scripts #631

@mundele2004

Description

@mundele2004

Summary

Currently, the Python scripts under kgateway.dev/scripts/ do not have unit test coverage (except test-missing-types.py, which currently appears to be broken).

Problem

  • Scripts are executed and verified manually
  • No automated test coverage exists for:
    • Docs generation scripts
    • Link checking / validation scripts
  • Any change to these scripts can introduce regressions without being detected by CI

Why this matters

These scripts play an important role in documentation generation and validation.
Without automated tests:

  • Refactoring is risky
  • CI cannot catch regressions early
  • Contributors must rely on manual verification

Proposed improvement

  • Add unit tests for Python scripts under kgateway.dev/scripts/
  • Use pytest (or existing preferred framework)
  • Mock filesystem and external calls where applicable
  • Fix or replace the existing test-missing-types.py

Scope (suggested)

  • Cover core logic of scripts (input → output behavior)
  • Ensure tests can run as part of CI

Expected outcome

  • Safer refactors
  • Improved CI reliability
  • Better contributor confidence when modifying scripts

I’d be happy to work on this if the maintainers agree with the approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions