diff options
| author | Julie Qiu <julie@golang.org> | 2020-08-27 23:47:34 -0400 |
|---|---|---|
| committer | Julie Qiu <julie@golang.org> | 2020-08-28 19:22:05 +0000 |
| commit | a293d4cc010076d90451c33f01d43e356418b9f5 (patch) | |
| tree | 40aeef2ebb9ead6431bb3e56255b19e02c5106a3 /internal/postgres/insert_module_test.go | |
| parent | 09d03b1f210879879857f32ffd59e87b9d5bbafb (diff) | |
| download | go-x-pkgsite-a293d4cc010076d90451c33f01d43e356418b9f5.tar.xz | |
internal: change signature of GetUnit
For golang/go#39629
Change-Id: I210b767582bdc7e5bb3adae72a3e4d9a83be5ab5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/251268
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'internal/postgres/insert_module_test.go')
| -rw-r--r-- | internal/postgres/insert_module_test.go | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/internal/postgres/insert_module_test.go b/internal/postgres/insert_module_test.go index fdcde29f..482c5975 100644 --- a/internal/postgres/insert_module_test.go +++ b/internal/postgres/insert_module_test.go @@ -111,7 +111,12 @@ func checkModule(ctx context.Context, t *testing.T, want *internal.Module) { } for _, dir := range want.Units { - got, err := testDB.GetUnit(ctx, dir.Path, want.ModulePath, want.Version, 0, internal.AllFields) + pathInfo := &internal.PathInfo{ + Path: dir.Path, + ModulePath: want.ModulePath, + Version: want.Version, + } + got, err := testDB.GetUnit(ctx, pathInfo, internal.AllFields) if err != nil { t.Fatal(err) } @@ -185,7 +190,12 @@ func TestInsertModuleLicenseCheck(t *testing.T) { checkHasRedistData(mi.LegacyReadmeContents, pkg.DocumentationHTML, bypass) // New model - dir, err := db.GetUnit(ctx, mod.ModulePath, mod.ModulePath, mod.Version, 0, internal.AllFields) + pathInfo := &internal.PathInfo{ + Path: mod.ModulePath, + ModulePath: mod.ModulePath, + Version: mod.Version, + } + dir, err := db.GetUnit(ctx, pathInfo, internal.AllFields) if err != nil { t.Fatal(err) } |
