From 84a9264bade197d51d1c0fd076219c325b4d3ece Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Wed, 3 Feb 2021 14:31:27 -0500 Subject: [PATCH] internal/frontend: remove testPackage.doc This field was set in test cases, but never inserted into the DB or compared. Change-Id: Ia25d8b8b91d4abcd18e9a8532d80ae0c4c77a45b Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/289236 Trust: Jonathan Amsterdam Run-TryBot: Jonathan Amsterdam TryBot-Result: kokoro Reviewed-by: Julie Qiu --- internal/frontend/latest_version_test.go | 1 - internal/frontend/server_test.go | 11 ----------- 2 files changed, 12 deletions(-) diff --git a/internal/frontend/latest_version_test.go b/internal/frontend/latest_version_test.go index cdbce8fc..f469008c 100644 --- a/internal/frontend/latest_version_test.go +++ b/internal/frontend/latest_version_test.go @@ -24,7 +24,6 @@ func TestLatestMinorVersion(t *testing.T) { packages: []testPackage{ { suffix: "bar", - doc: sample.DocumentationHTML.String(), readmeContents: sample.ReadmeContents, readmeFilePath: sample.ReadmeFilePath, }, diff --git a/internal/frontend/server_test.go b/internal/frontend/server_test.go index 41c0e985..a969ab8e 100644 --- a/internal/frontend/server_test.go +++ b/internal/frontend/server_test.go @@ -62,7 +62,6 @@ type testModule struct { type testPackage struct { name string suffix string - doc string readmeContents string readmeFilePath string } @@ -108,13 +107,11 @@ var testModules = []testModule{ packages: []testPackage{ { suffix: "foo", - doc: sample.DocumentationHTML.String(), readmeContents: sample.ReadmeContents, readmeFilePath: sample.ReadmeFilePath, }, { suffix: "foo/directory/hello", - doc: `io.Writer`, }, }, }, @@ -126,23 +123,19 @@ var testModules = []testModule{ packages: []testPackage{ { suffix: "bar", - doc: sample.DocumentationHTML.String(), readmeContents: sample.ReadmeContents, readmeFilePath: sample.ReadmeFilePath, }, { suffix: "bar/directory/hello", - doc: `io.Writer`, }, { suffix: "buz", - doc: sample.DocumentationHTML.String(), readmeContents: sample.ReadmeContents, readmeFilePath: sample.ReadmeFilePath, }, { suffix: "buz/directory/hello", - doc: `io.Writer`, }, }, }, @@ -154,13 +147,11 @@ var testModules = []testModule{ packages: []testPackage{ { suffix: "bar", - doc: sample.DocumentationHTML.String(), readmeContents: sample.ReadmeContents, readmeFilePath: sample.ReadmeFilePath, }, { suffix: "bar/directory/hello", - doc: `io.Writer`, }, }, }, @@ -229,7 +220,6 @@ var testModules = []testModule{ // UnitMeta (right sidebar) links will be from the godoc and // module readme. suffix: "no_readme", - doc: sample.DocumentationHTML.String(), }, { // This package has a readme as well as godoc links, so the @@ -237,7 +227,6 @@ var testModules = []testModule{ suffix: "has_readme", readmeFilePath: "has_readme/README.md", // required readmeContents: packageLinksReadme, - doc: sample.DocumentationHTML.String(), }, }, },