From 01a72d71a6202e77ab9373fb6b5efee6d8588e8e Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Fri, 13 Aug 2021 17:22:06 -0400 Subject: 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 Run-TryBot: Jonathan Amsterdam TryBot-Result: kokoro Reviewed-by: Julie Qiu --- internal/postgres/insert_module_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/postgres/insert_module_test.go') 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) } } -- cgit v1.3-6-g1900