diff options
| author | Julie Qiu <julie@golang.org> | 2020-08-31 21:19:41 -0400 |
|---|---|---|
| committer | Julie Qiu <julie@golang.org> | 2020-09-01 14:40:41 +0000 |
| commit | a327f4f5ecaffa6d82bfe9cf767b10104c2dcd28 (patch) | |
| tree | 5d980802ad466f0fa2841f770cd95919855ba0d1 /internal/postgres/path_test.go | |
| parent | 4d4b7bf93903cfc8e05824502b05a2721859f292 (diff) | |
| download | go-x-pkgsite-a327f4f5ecaffa6d82bfe9cf767b10104c2dcd28.tar.xz | |
internal: replace Unit.DirectoryMeta with Unit.PathInfo
Unit.DirectoryMeta is replaced with Unit.PathInfo
DirectoryMeta isn't necessary and will be deleted in a future CL.
For golang/go#39629
Change-Id: I521a062207d3f48592d6e949306a015458d1398d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/251957
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/path_test.go')
| -rw-r--r-- | internal/postgres/path_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/postgres/path_test.go b/internal/postgres/path_test.go index c77b6140..35e3079a 100644 --- a/internal/postgres/path_test.go +++ b/internal/postgres/path_test.go @@ -56,7 +56,7 @@ func TestGetPathInfo(t *testing.T) { } for d := pkgPath; d != "." && len(d) >= len(testModule.module); d = path.Dir(d) { dir := &internal.Unit{ - DirectoryMeta: internal.DirectoryMeta{ + PathInfo: internal.PathInfo{ Path: d, Licenses: sample.LicenseMetadata, }, @@ -203,13 +203,13 @@ func TestGetPathInfo(t *testing.T) { test.want.Name, test.want.IsRedistributable, ) + test.want.CommitTime = sample.CommitTime got, err := testDB.GetPathInfo(ctx, test.path, test.module, test.version) if err != nil { t.Fatal(err) } opts := []cmp.Option{ cmpopts.IgnoreFields(licenses.Metadata{}, "Coverage"), - cmpopts.IgnoreFields(internal.PathInfo{}, "CommitTime"), cmp.AllowUnexported(source.Info{}, safehtml.HTML{}), } if diff := cmp.Diff(test.want, got, opts...); diff != "" { |
