internal/postgres: replace LegacyPackage in TestUpdateSearchDocumentsImportedByCount

For golang/go#39629

Change-Id: I39f42875f4dc7e221ec7c0670502fe5044610f24
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/262761
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>
diff --git a/internal/postgres/search_test.go b/internal/postgres/search_test.go
index a405295..72ecd55 100644
--- a/internal/postgres/search_test.go
+++ b/internal/postgres/search_test.go
@@ -844,7 +844,7 @@
 		return sd
 	}
 
-	pkgPath := func(m *internal.Module) string { return m.LegacyPackages[0].Path }
+	pkgPath := func(m *internal.Module) string { return m.Packages()[0].Path }
 
 	t.Run("basic", func(t *testing.T) {
 		defer ResetTestDB(testDB, t)
@@ -919,7 +919,7 @@
 		// Now we see an earlier version of that package, without a go.mod file, so we insert it.
 		// It should not get inserted into search_documents.
 		mAlt := sample.LegacyModule(alternativeModulePath, "v1.0.0", "A")
-		mAlt.LegacyPackages[0].Imports = []string{"B"}
+		mAlt.Packages()[0].Imports = []string{"B"}
 		if err := testDB.InsertModule(ctx, mAlt); err != nil {
 			t.Fatal(err)
 		}