aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2018-08-18 00:41:52 -0400
committerRuss Cox <rsc@golang.org>2018-08-18 18:23:02 +0000
commitc5046bca7b06ab73225040abdc53430511049b56 (patch)
tree788378b6cc460bc132e8bc756da1dfca500c08c1
parent5d750db02415e9b3ff5624ecbaf1f5d141145bde (diff)
downloadgo-c5046bca7b06ab73225040abdc53430511049b56.tar.gz
go-c5046bca7b06ab73225040abdc53430511049b56.zip
cmd/go/internal/modconv: fix TestConvertLegacyConfig expectations
It was a bug to find that commit in the Masterminds/semver repo. It's not part of the main repo but only part of an unmerged pull request. The code was updated to try not to look at unmerged pull requests, but the test was not. Worse, whether the code succeeds at not looking at unmerged pull requests apparently depends on the git version. Sigh. Fixes #26754. Fixes #27043. Change-Id: Ib9e07f565906de4f1169244911a258396688f14d Reviewed-on: https://go-review.googlesource.com/129800 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-rw-r--r--src/cmd/go/internal/modconv/convert_test.go52
1 files changed, 30 insertions, 22 deletions
diff --git a/src/cmd/go/internal/modconv/convert_test.go b/src/cmd/go/internal/modconv/convert_test.go
index f430380871..ad27abb8ef 100644
--- a/src/cmd/go/internal/modconv/convert_test.go
+++ b/src/cmd/go/internal/modconv/convert_test.go
@@ -61,28 +61,36 @@ func TestConvertLegacyConfig(t *testing.T) {
vers string
gomod string
}{
- {
- // Gopkg.lock parsing.
- "github.com/golang/dep", "v0.4.0",
- `module github.com/golang/dep
-
- require (
- github.com/Masterminds/semver v0.0.0-20170726230514-a93e51b5a57e
- github.com/Masterminds/vcs v1.11.1
- github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7
- github.com/boltdb/bolt v1.3.1
- github.com/go-yaml/yaml v0.0.0-20170407172122-cd8b52f8269e
- github.com/golang/protobuf v0.0.0-20170901042739-5afd06f9d81a
- github.com/jmank88/nuts v0.3.0
- github.com/nightlyone/lockfile v0.0.0-20170707060451-e83dc5e7bba0
- github.com/pelletier/go-toml v0.0.0-20171218135716-b8b5e7696574
- github.com/pkg/errors v0.8.0
- github.com/sdboyer/constext v0.0.0-20170321163424-836a14457353
- golang.org/x/net v0.0.0-20170828231752-66aacef3dd8a
- golang.org/x/sync v0.0.0-20170517211232-f52d1811a629
- golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea
- )`,
- },
+ /*
+ Different versions of git seem to find or not find
+ github.com/Masterminds/semver's a93e51b5a57e,
+ which is an unmerged pull request.
+ We'd rather not provide access to unmerged pull requests,
+ so the line is removed from the golden file here,
+ but some git commands still find it somehow.
+
+ {
+ // Gopkg.lock parsing.
+ "github.com/golang/dep", "v0.4.0",
+ `module github.com/golang/dep
+
+ require (
+ github.com/Masterminds/vcs v1.11.1
+ github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7
+ github.com/boltdb/bolt v1.3.1
+ github.com/go-yaml/yaml v0.0.0-20170407172122-cd8b52f8269e
+ github.com/golang/protobuf v0.0.0-20170901042739-5afd06f9d81a
+ github.com/jmank88/nuts v0.3.0
+ github.com/nightlyone/lockfile v0.0.0-20170707060451-e83dc5e7bba0
+ github.com/pelletier/go-toml v0.0.0-20171218135716-b8b5e7696574
+ github.com/pkg/errors v0.8.0
+ github.com/sdboyer/constext v0.0.0-20170321163424-836a14457353
+ golang.org/x/net v0.0.0-20170828231752-66aacef3dd8a
+ golang.org/x/sync v0.0.0-20170517211232-f52d1811a629
+ golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea
+ )`,
+ },
+ */
// TODO: https://github.com/docker/distribution uses vendor.conf