aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/path.go
diff options
context:
space:
mode:
authorJonathan Amsterdam <jba@google.com>2021-04-06 08:33:20 -0400
committerJonathan Amsterdam <jba@google.com>2021-04-06 16:49:01 +0000
commitee71ea76e32d834eebc52a8dfb6f96c7b393e554 (patch)
tree82ca4203eede1b891332494413e0e51e8ff15d63 /internal/postgres/path.go
parentc6c01755cd7185503216bd48ce90911095405dc3 (diff)
downloadgo-x-pkgsite-ee71ea76e32d834eebc52a8dfb6f96c7b393e554.tar.xz
internal/postgres: clarify TestGetLatestMajorPathForV1Path
I found this test hard to understand because it was doing so much to the test inputs. I brought the test inputs and expected values closer to the actual arguments and return values of the function under test. Change-Id: I6d72033e21eddfcc78f5803563c4bbf9e2e19356 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/307392 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org> Reviewed-by: Julie Qiu <julie@golang.org>
Diffstat (limited to 'internal/postgres/path.go')
-rw-r--r--internal/postgres/path.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/postgres/path.go b/internal/postgres/path.go
index 099fc798..61df19d5 100644
--- a/internal/postgres/path.go
+++ b/internal/postgres/path.go
@@ -19,7 +19,7 @@ import (
)
// GetLatestMajorPathForV1Path reports the latest unit path in the series for
-// the given v1path.
+// the given v1path. It also returns the major version for that path.
func (db *DB) GetLatestMajorPathForV1Path(ctx context.Context, v1path string) (_ string, _ int, err error) {
defer derrors.WrapStack(&err, "DB.GetLatestPathForV1Path(ctx, %q)", v1path)
q := `