[pkgsite] internal/api: test ServePackage with db

0 views
Skip to first unread message

Jonathan Amsterdam (Gerrit)

unread,
Apr 14, 2026, 12:19:28 PM (23 hours ago) Apr 14
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Hyang-Ah Hana Kim, Ethan Lee, kokoro, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com

Jonathan Amsterdam submitted the change

Change information

Commit message:
internal/api: test ServePackage with db

Test the ServePackage function against a real database, as well as the
fake data source.

- Modules and packages must be redistributable, or the DB strips
the documentation.

- Documentation must contain source code.

We must temporarily skip the dependency tests, to reduce the diffs on
this change. The test is still important, because it asserts that the
pkgsite command has only a few dependencies. To re-establish it, we
will move the API tests to internal/testing/api.
Change-Id: I67243ea2345c5e735edbdd6ee5bf2349a6b1eb60
kokoro-CI: kokoro <noreply...@google.com>
Reviewed-by: Ethan Lee <etha...@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hya...@gmail.com>
Files:
  • M internal/api/api_test.go
  • M internal/log/log.go
  • M internal/log/log_test.go
  • M internal/tests/deps/cmd_pkgsite_deps_test.go
Change size: M
Delta: 4 files changed, 75 insertions(+), 39 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: pkgsite
Gerrit-Branch: master
Gerrit-Change-Id: I67243ea2345c5e735edbdd6ee5bf2349a6b1eb60
Gerrit-Change-Number: 765502
Gerrit-PatchSet: 4
Gerrit-Owner: Jonathan Amsterdam <j...@google.com>
Gerrit-Reviewer: Ethan Lee <etha...@google.com>
Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Reviewer: Jonathan Amsterdam <j...@google.com>
Gerrit-Reviewer: kokoro <noreply...@google.com>
Gerrit-CC: kokoro <noreply...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages