aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/insert_module_test.go
diff options
context:
space:
mode:
authorJulie Qiu <julie@golang.org>2020-09-29 17:58:42 -0400
committerJulie Qiu <julie@golang.org>2020-10-01 19:52:18 +0000
commit5d79cb892fcf287ca9c342d220bf47656ab63855 (patch)
treef5cd2a1540d594d67d998302dd74f33a55ee5e0a /internal/postgres/insert_module_test.go
parentdd584a641169a09a5cc154bd052673d4aa0b6b95 (diff)
downloadgo-x-pkgsite-5d79cb892fcf287ca9c342d220bf47656ab63855.tar.xz
internal/postgres: delete LegacyGetPackage
For golang/go#39629 Change-Id: I4e8cb716f16821bfe884cfe1e4b5f05ef62f16ef Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/258317 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'internal/postgres/insert_module_test.go')
-rw-r--r--internal/postgres/insert_module_test.go18
1 files changed, 0 insertions, 18 deletions
diff --git a/internal/postgres/insert_module_test.go b/internal/postgres/insert_module_test.go
index ac2500f1..2ffad6b9 100644
--- a/internal/postgres/insert_module_test.go
+++ b/internal/postgres/insert_module_test.go
@@ -93,24 +93,6 @@ func checkModule(ctx context.Context, t *testing.T, want *internal.Module) {
t.Fatalf("testDB.GetModuleInfo(%q, %q) mismatch (-want +got):\n%s", want.ModulePath, want.Version, diff)
}
- for _, wantp := range want.LegacyPackages {
- got, err := testDB.LegacyGetPackage(ctx, wantp.Path, want.ModulePath, want.Version)
- if err != nil {
- t.Fatal(err)
- }
- opts := cmp.Options{
- // The packages table only includes partial license information; it
- // omits the Coverage field.
- cmpopts.IgnoreFields(internal.LegacyPackage{}, "Imports"),
- cmpopts.IgnoreFields(licenses.Metadata{}, "Coverage"),
- cmpopts.EquateEmpty(),
- cmp.AllowUnexported(safehtml.HTML{}),
- }
- if diff := cmp.Diff(*wantp, got.LegacyPackage, opts...); diff != "" {
- t.Fatalf("testDB.LegacyGetPackage(%q, %q) mismatch (-want +got):\n%s", wantp.Path, want.Version, diff)
- }
- }
-
for _, wantu := range want.Units {
got, err := testDB.GetUnit(ctx, &wantu.UnitMeta, internal.AllFields)
if err != nil {