aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/insert_module_test.go
diff options
context:
space:
mode:
authorJonathan Amsterdam <jba@google.com>2021-08-13 17:22:06 -0400
committerJonathan Amsterdam <jba@google.com>2021-08-16 14:04:40 +0000
commit01a72d71a6202e77ab9373fb6b5efee6d8588e8e (patch)
tree03111b2b0a87434d9860e6ff17215d4fff686cff /internal/postgres/insert_module_test.go
parentf3045b5dce6b0d609f837238dfd815bd9804abce (diff)
downloadgo-x-pkgsite-01a72d71a6202e77ab9373fb6b5efee6d8588e8e.tar.xz
internal/{worker,postgres}: check current module for alternative
When reconciling the contents of search_documents when we insert a module, consider whether the version currently being processed is alternative. Previously, we didn't consider the current module because we only checked the DB, and the status code for the current module hasn't been inserted yet. Change-Id: Ibeb02d7f56341119e2bf4f20f148b345b2b82828 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/341868 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
Diffstat (limited to 'internal/postgres/insert_module_test.go')
-rw-r--r--internal/postgres/insert_module_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/postgres/insert_module_test.go b/internal/postgres/insert_module_test.go
index 66233bf5..2f5fbac3 100644
--- a/internal/postgres/insert_module_test.go
+++ b/internal/postgres/insert_module_test.go
@@ -640,7 +640,7 @@ func TestReInsertLatestVersion(t *testing.T) {
}); err != nil {
t.Fatal(err)
}
- if err := testDB.ReInsertLatestVersion(ctx, modulePath); err != nil {
+ if err := testDB.ReInsertLatestVersion(ctx, modulePath, version, status); err != nil {
t.Fatal(err)
}
}