]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go/internal/modload: fix an erroneous comment about the test repo
authorBryan C. Mills <bcmills@google.com>
Fri, 10 Jan 2020 14:37:32 +0000 (09:37 -0500)
committerBryan C. Mills <bcmills@google.com>
Fri, 10 Jan 2020 21:56:20 +0000 (21:56 +0000)
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>
src/cmd/go/internal/modload/query_test.go

index bad34f088d500ae0309d2a87a30fd6f033c26d37..15470e2685367b1ea8bdd8a3fe53de5dfb0ce145 100644 (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"},