Skip to content

Add test coverage for DiffGatherer and comparison retry logic #23

@ArjenSchwarz

Description

@ArjenSchwarz

Context

From code review of #21 (multi-spec comparison feature).

Current Coverage Gaps

  • DiffGatherer in internal/comparison/diff.go: 0% coverage - completely untested
  • Comparator.Compare retry logic: Only ~30% coverage - retry paths not fully exercised
  • Template helper functions (add, sub): 0% coverage (trivial, low priority)

Suggested Improvements

  1. Add unit tests for DiffGatherer that mock git operations
  2. Add tests that exercise the JSON validation retry loop in Compare
  3. Consider integration tests with real git operations (in CI environment)

Priority

Medium - the code works but lacks test coverage for important paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions