Skip to content

Add tests for web dependency pages and restore COVER_MIN to 75#5

Merged
andrew merged 2 commits into
mainfrom
deps-pages-tests
Jul 2, 2026
Merged

Add tests for web dependency pages and restore COVER_MIN to 75#5
andrew merged 2 commits into
mainfrom
deps-pages-tests

Conversation

@andrew

@andrew andrew commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Adds internal/http/web/deps_pages_test.go covering /dependencies, /dependencies/blame, /dependencies/stats, and /dependencies/{purl}. The fixture seeds a two-commit repo with a go.mod, reindexes through a pkgs.Store injected via WithPkgsStore, and asserts status, content type, and body content. Also covers the indexing banner and purlPackageName.

Overall ./internal/... coverage 73.8% → 77.5%, so COVER_MIN goes back to 75.

The tests surfaced a bug in purlPackageName: it cut at the first @, so npm scoped packages like pkg:npm/%40babel/core@7.24.0 returned an empty name. Replaced the hand-rolled parser with purl.Parse(s).FullName() from git-pkgs/purl, which also gives the right separator per ecosystem (e.g. org.junit:junit for maven). indexByteFrom is removed.

@andrew andrew merged commit eb83d35 into main Jul 2, 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