diff options
| author | Julie Qiu <julie@golang.org> | 2021-05-04 18:54:28 -0400 |
|---|---|---|
| committer | Julie Qiu <julie@golang.org> | 2021-05-05 16:29:51 +0000 |
| commit | 0dd74b0147638cc0e83d4e4dcb5494f84f4128a4 (patch) | |
| tree | 6e12db11f089d8572218653621eedd3df1838b1b /internal/postgres/unit_test.go | |
| parent | d91b6b559ecd20d8627f8e6ed1fca5e1b4f4ac86 (diff) | |
| download | go-x-pkgsite-0dd74b0147638cc0e83d4e4dcb5494f84f4128a4.tar.xz | |
internal: enable symbol history for stdlib
Symbol history for standard library packages are now always displayed.
For golang/go#37102
Change-Id: I323c7735726a22d4caac39bebd2e8d912fd03aad
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/317013
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'internal/postgres/unit_test.go')
| -rw-r--r-- | internal/postgres/unit_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/postgres/unit_test.go b/internal/postgres/unit_test.go index 40fc7be7..2cf110e1 100644 --- a/internal/postgres/unit_test.go +++ b/internal/postgres/unit_test.go @@ -77,6 +77,7 @@ func testGetUnitMeta(t *testing.T, ctx context.Context) { t.Fatal(err) } opts := []cmp.Option{ + cmpopts.EquateEmpty(), cmpopts.IgnoreFields(licenses.Metadata{}, "Coverage", "OldCoverage"), cmpopts.IgnoreFields(internal.UnitMeta{}, "HasGoMod"), cmp.AllowUnexported(source.Info{}, safehtml.HTML{}), @@ -353,6 +354,7 @@ func TestGetUnitMetaBypass(t *testing.T) { t.Fatal(err) } opts := []cmp.Option{ + cmpopts.EquateEmpty(), cmpopts.IgnoreFields(licenses.Metadata{}, "Coverage", "OldCoverage"), cmpopts.IgnoreFields(internal.UnitMeta{}, "HasGoMod"), cmp.AllowUnexported(source.Info{}, safehtml.HTML{}), @@ -760,6 +762,7 @@ func checkUnit(ctx context.Context, t *testing.T, db *DB, um *internal.UnitMeta, want.SourceInfo = um.SourceInfo want.NumImports = len(want.Imports) opts = append(opts, + cmpopts.EquateEmpty(), cmpopts.IgnoreFields(internal.Unit{}, "Imports", "LicenseContents"), ) if diff := cmp.Diff(want, got, opts...); diff != "" { @@ -858,6 +861,7 @@ func TestGetUnitFieldSet(t *testing.T) { } opts := []cmp.Option{ cmp.AllowUnexported(source.Info{}, safehtml.HTML{}), + cmpopts.EquateEmpty(), // The packages table only includes partial license information; it omits the Coverage field. cmpopts.IgnoreFields(licenses.Metadata{}, "Coverage", "OldCoverage"), } |
