aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/unit_test.go
diff options
context:
space:
mode:
authorJonathan Amsterdam <jba@google.com>2021-04-07 20:16:23 -0400
committerJonathan Amsterdam <jba@google.com>2021-04-08 16:30:30 +0000
commitd025eb3c769441121bed31b2ad95f5ceea10ad4b (patch)
tree6609eed1eb903662ca50f933d577d18167aadca5 /internal/postgres/unit_test.go
parentd189d9d19b2d6ec3358cc44d98c6354682aee052 (diff)
downloadgo-x-pkgsite-d025eb3c769441121bed31b2ad95f5ceea10ad4b.tar.xz
internal/postgres,etc: finish MustInsertModule cleanup
Now that there are no callers of MustInsertModule, rename MustInsertModuleLatest to MustInsertModule. We can also remove MustInsertModuleLMV. Change-Id: Ieb554ee32696c168be4cc0a14ecece9f4c6b91b4 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/308271 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org>
Diffstat (limited to 'internal/postgres/unit_test.go')
-rw-r--r--internal/postgres/unit_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/postgres/unit_test.go b/internal/postgres/unit_test.go
index 69b0bc9b..cf4f7ea4 100644
--- a/internal/postgres/unit_test.go
+++ b/internal/postgres/unit_test.go
@@ -331,7 +331,7 @@ func TestGetUnitMetaBypass(t *testing.T) {
m := sample.Module(testModule.module, testModule.version, testModule.packageSuffix)
makeModuleNonRedistributable(m)
- MustInsertModuleLatest(ctx, t, bypassDB, m)
+ MustInsertModule(ctx, t, bypassDB, m)
requested := m.Version
if testModule.isMaster {
requested = "master"
@@ -699,7 +699,7 @@ func TestGetUnit(t *testing.T) {
Filepath: "PKG_README.md",
Contents: "pkg readme",
}
- MustInsertModuleLatest(ctx, t, testDB, m)
+ MustInsertModule(ctx, t, testDB, m)
// Add a module that has documentation for two Go build contexts.
m = sample.Module("a.com/twodoc", "v1.2.3", "p")
@@ -709,7 +709,7 @@ func TestGetUnit(t *testing.T) {
sample.Documentation("windows", "amd64", `package p; var W int`),
}
pkg.Documentation = docs2
- MustInsertModuleLatest(ctx, t, testDB, m)
+ MustInsertModule(ctx, t, testDB, m)
for _, test := range []struct {
name, path, modulePath, version string
@@ -881,7 +881,7 @@ func TestGetUnit_SubdirectoriesShowNonRedistPackages(t *testing.T) {
m := sample.DefaultModule()
m.IsRedistributable = false
m.Packages()[0].IsRedistributable = false
- MustInsertModuleLatest(ctx, t, testDB, m)
+ MustInsertModule(ctx, t, testDB, m)
}
func TestGetUnitFieldSet(t *testing.T) {
@@ -898,7 +898,7 @@ func TestGetUnitFieldSet(t *testing.T) {
// Add a module that has READMEs in a directory and a package.
m := sample.Module("a.com/m", "v1.2.3", "dir/p")
m.Packages()[0].Readme = readme
- MustInsertModuleLatest(ctx, t, testDB, m)
+ MustInsertModule(ctx, t, testDB, m)
cleanFields := func(u *internal.Unit, fields internal.FieldSet) {
// Add/remove fields based on the FieldSet specified.
@@ -1022,7 +1022,7 @@ func TestGetUnitBypass(t *testing.T) {
bypassDB := NewBypassingLicenseCheck(testDB.db)
m := nonRedistributableModule()
- MustInsertModuleLatest(ctx, t, bypassDB, m)
+ MustInsertModule(ctx, t, bypassDB, m)
for _, test := range []struct {
db *DB