Commit 1d4d7825 authored by Bryan C. Mills's avatar Bryan C. Mills

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: default avatarDmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: default avatarJay Conrod <jayconrod@google.com>
parent 5d007515
...@@ -163,10 +163,14 @@ var queryTests = []struct { ...@@ -163,10 +163,14 @@ var queryTests = []struct {
{path: queryRepoV2, query: "v2.6.0-pre1", vers: "v2.6.0-pre1"}, {path: queryRepoV2, query: "v2.6.0-pre1", vers: "v2.6.0-pre1"},
{path: queryRepoV2, query: "latest", vers: "v2.5.5"}, {path: queryRepoV2, query: "latest", vers: "v2.5.5"},
// e0cf3de987e6 is the latest commit on the master branch, and it's actually // Commit e0cf3de987e6 is actually v1.19.10-pre1, not anything resembling v3,
// v1.19.10-pre1, not anything resembling v3: attempting to query it as such // and it has a go.mod file with a non-v3 module path. Attempting to query it
// should fail. // 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`}, {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: queryRepoV3, query: "latest", err: `no matching versions for query "latest"`},
{path: emptyRepo, query: "latest", vers: "v0.0.0-20180704023549-7bb914627242"}, {path: emptyRepo, query: "latest", vers: "v0.0.0-20180704023549-7bb914627242"},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment