Skip to content

Add tests for internal/http/api#4

Merged
andrew merged 1 commit into
mainfrom
api-tests
Jun 29, 2026
Merged

Add tests for internal/http/api#4
andrew merged 1 commit into
mainfrom
api-tests

Conversation

@andrew

@andrew andrew commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Adds an httptest-based suite covering every route in the JSON API handler (list, blame, history, diff, show, stats, sbom), plus unit tests for filterDeps and computeDiff.

The fixture seeds a two-commit bare repo via the git CLI, reindexes through pkgs.Store, and asserts status codes, response bodies, and content types. Also covers the X-Pkgs-Indexing header path and 404/400 cases.

Package coverage 0% → 81.3%, overall ./internal/... coverage 65.6% → 73.8%.

@andrew andrew merged commit 17c6851 into main Jun 29, 2026
2 checks passed
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.

1 participant