From d4c1addff09c68d7a409cfc91f088e4f58c3b1dc Mon Sep 17 00:00:00 2001 From: Julie Qiu Date: Tue, 25 Aug 2020 14:09:13 -0400 Subject: 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 TryBot-Result: kokoro Reviewed-by: Jonathan Amsterdam --- internal/postgres/insert_module_test.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/postgres/insert_module_test.go') 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"), -- cgit v1.3-5-g9baa