aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/insert_module_test.go
diff options
context:
space:
mode:
authorJulie Qiu <julie@golang.org>2020-08-25 14:09:13 -0400
committerJulie Qiu <julie@golang.org>2020-08-26 14:04:33 +0000
commitd4c1addff09c68d7a409cfc91f088e4f58c3b1dc (patch)
tree963591d46cf61c9fb9cb0f9eacd13660078d5dc3 /internal/postgres/insert_module_test.go
parentaffbde791fef275495a42a47361f0aac904fc55c (diff)
downloadgo-x-pkgsite-d4c1addff09c68d7a409cfc91f088e4f58c3b1dc.tar.xz
internal: add Name to DirectoryMeta
For golang/go#39629 Change-Id: Iad754b0c4e82b859b6a3dac60ace85c621423d7b Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/250538 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.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/postgres/insert_module_test.go b/internal/postgres/insert_module_test.go
index 7e726fff..dcaaeb67 100644
--- a/internal/postgres/insert_module_test.go
+++ b/internal/postgres/insert_module_test.go
@@ -122,6 +122,9 @@ func checkModule(ctx context.Context, t *testing.T, want *internal.Module) {
Contents: sample.ReadmeContents,
}
dir.ModuleInfo = want.ModuleInfo
+ if dir.Package != nil {
+ dir.Name = dir.Package.Name
+ }
wantd := dir
opts := cmp.Options{
cmpopts.IgnoreFields(internal.LegacyModuleInfo{}, "LegacyReadmeFilePath"),