1
0
mirror of https://github.com/golang/go synced 2024-11-18 03:54:50 -07:00

cmd/go/internal/modload: fix an erroneous comment about the test repo

Updates #36489

Change-Id: I1ca215ba0a64a31d662134385b8be46bb4ba4434
Reviewed-on: https://go-review.googlesource.com/c/go/+/214282
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
This commit is contained in:
Bryan C. Mills 2020-01-10 09:37:32 -05:00
parent 5d0075156a
commit 1d4d7825a7

View File

@ -163,10 +163,14 @@ var queryTests = []struct {
{path: queryRepoV2, query: "v2.6.0-pre1", vers: "v2.6.0-pre1"},
{path: queryRepoV2, query: "latest", vers: "v2.5.5"},
// e0cf3de987e6 is the latest commit on the master branch, and it's actually
// v1.19.10-pre1, not anything resembling v3: attempting to query it as such
// should fail.
// Commit e0cf3de987e6 is actually v1.19.10-pre1, not anything resembling v3,
// and it has a go.mod file with a non-v3 module path. Attempting to query it
// as the v3 module should fail.
{path: queryRepoV3, query: "e0cf3de987e6", err: `vcs-test.golang.org/git/querytest.git/v3@v3.0.0-20180704024501-e0cf3de987e6: invalid version: go.mod has non-.../v3 module path "vcs-test.golang.org/git/querytest.git" (and .../v3/go.mod does not exist) at revision e0cf3de987e6`},
// The querytest repo does not have any commits tagged with major version 3,
// and the latest commit in the repo has a go.mod file specifying a non-v3 path.
// That should prevent us from resolving any version for the /v3 path.
{path: queryRepoV3, query: "latest", err: `no matching versions for query "latest"`},
{path: emptyRepo, query: "latest", vers: "v0.0.0-20180704023549-7bb914627242"},