diff options
| author | Julie Qiu <julie@golang.org> | 2020-06-09 12:41:07 -0400 |
|---|---|---|
| committer | Julie Qiu <julieqiu@google.com> | 2020-06-09 21:15:16 +0000 |
| commit | 5f3d28792fdeabf75b026a258b05935d1bfb8417 (patch) | |
| tree | a1b47742bc1a4177a84d78f6f0fb38be7b42bc46 /internal/postgres/insert_module_test.go | |
| parent | b663f47268034db631fec0c41fe1bd7864b8edf6 (diff) | |
| download | go-x-pkgsite-5f3d28792fdeabf75b026a258b05935d1bfb8417.tar.xz | |
internal: rename ModuleInfo to LegacyModuleInfo
ModuleInfo is renamed to LegacyModuleInfo, as a step towards
deprecating LegacyReadmeFilePath and LegacyReadmeContents.
In a follow up CL, we will add ModuleInfo as an embedded struct
to LegacyModuleInfo.
Change-Id: Ie452420448eec1d13edaf62e548df0b9e2cbbe4b
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/766479
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.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.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/postgres/insert_module_test.go b/internal/postgres/insert_module_test.go index 99a5bf02..7e9f01f6 100644 --- a/internal/postgres/insert_module_test.go +++ b/internal/postgres/insert_module_test.go @@ -88,7 +88,7 @@ func TestInsertModule(t *testing.T) { if err != nil { t.Fatal(err) } - if diff := cmp.Diff(test.module.ModuleInfo, *got, cmp.AllowUnexported(source.Info{})); diff != "" { + if diff := cmp.Diff(test.module.LegacyModuleInfo, *got, cmp.AllowUnexported(source.Info{})); diff != "" { t.Fatalf("testDB.GetModuleInfo(%q, %q) mismatch (-want +got):\n%s", test.module.ModulePath, test.module.Version, diff) } @@ -117,12 +117,12 @@ func TestInsertModule(t *testing.T) { t.Fatal(err) } want := internal.VersionedDirectory{ - DirectoryNew: *dir, - ModuleInfo: test.module.ModuleInfo, + DirectoryNew: *dir, + LegacyModuleInfo: test.module.LegacyModuleInfo, } opts := cmp.Options{ - cmpopts.IgnoreFields(internal.ModuleInfo{}, "LegacyReadmeFilePath"), - cmpopts.IgnoreFields(internal.ModuleInfo{}, "LegacyReadmeContents"), + cmpopts.IgnoreFields(internal.LegacyModuleInfo{}, "LegacyReadmeFilePath"), + cmpopts.IgnoreFields(internal.LegacyModuleInfo{}, "LegacyReadmeContents"), cmpopts.IgnoreFields(licenses.Metadata{}, "Coverage"), cmp.AllowUnexported(source.Info{}), } @@ -211,7 +211,7 @@ func TestInsertModuleErrors(t *testing.T) { func TestPostgres_ReadAndWriteModuleOtherColumns(t *testing.T) { // Verify that InsertModule correctly populates the columns in the versions - // table that are not in the ModuleInfo struct. + // table that are not in the LegacyModuleInfo struct. defer ResetTestDB(testDB, t) ctx := context.Background() |
