From 1d1ff469660437e4d4992b421beb6e31b19e1970 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Fri, 10 May 2019 11:10:50 -0400 Subject: [PATCH] cmd/go/testdata/script: remove skips and clarify comments in mod_*_upgrade_pseudo tests These tests were added in CL 174206. They required a 'git' binary and network access in an earlier draft, but now use the test-local module proxy instead, so no longer need to be skipped when those resources are not present. Updates #30634 Change-Id: I5f36c6c776209a89bc45d133847df5052b55da59 Reviewed-on: https://go-review.googlesource.com/c/go/+/176537 Run-TryBot: Bryan C. Mills Reviewed-by: Jay Conrod TryBot-Result: Gobot Gobot --- .../script/mod_get_upgrade_pseudo.txt | 21 +++++++------------ .../script/mod_list_upgrade_pseudo.txt | 21 +++++++------------ 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/src/cmd/go/testdata/script/mod_get_upgrade_pseudo.txt b/src/cmd/go/testdata/script/mod_get_upgrade_pseudo.txt index 69acea57bbc..80b240130fd 100644 --- a/src/cmd/go/testdata/script/mod_get_upgrade_pseudo.txt +++ b/src/cmd/go/testdata/script/mod_get_upgrade_pseudo.txt @@ -1,19 +1,14 @@ env GO111MODULE=on -# Testing that a pseudo version with schematically higher version than the latest -# tagged version isn't downgraded when running 'go get -u'. +# For this test module there are three versions: +# * v0.1.1-0.20190429073117-b5426c86b553 +# * v0.1.0 +# * v0.0.0-20190429073000-30950c05d534 +# Only v0.1.0 is tagged. +# +# The latest pseudo-version is semantically higher than the latest tag. +# 'get -u' should not downgrade to the (lower) tagged version. -[!net] skip -[!exec:git] skip - -# For this test repository there are three commits: -# * b5426c8 "master" (v0.1.1-0.20190429073117-b5426c86b553) -# * a90cfd2 (tag: v0.1.0) -# * 30950c0 - -# When requesting master as specific version, a pseudo version is created with a -# higher version than the latest tag. Running 'go get -u' doesn't downgrade the -# version. go get -m example.com/pseudoupgrade@b5426c8 go get -u go list -m -u all diff --git a/src/cmd/go/testdata/script/mod_list_upgrade_pseudo.txt b/src/cmd/go/testdata/script/mod_list_upgrade_pseudo.txt index 6935e03d6ed..143e029e521 100644 --- a/src/cmd/go/testdata/script/mod_list_upgrade_pseudo.txt +++ b/src/cmd/go/testdata/script/mod_list_upgrade_pseudo.txt @@ -1,19 +1,14 @@ env GO111MODULE=on -# Testing that a pseudo version with schematically higher version than the latest -# tagged version isn't listed as upgradable when calling 'go list -m -u'. +# For this test module there are three versions: +# * v0.1.1-0.20190429073117-b5426c86b553 +# * v0.1.0 +# * v0.0.0-20190429073000-30950c05d534 +# Only v0.1.0 is tagged. +# +# The latest pseudo-version is semantically higher than the latest tag. +# 'list -u' should not suggest a lower version as an upgrade. -[!net] skip -[!exec:git] skip - -# For this test repository there are three commits: -# * b5426c8 "master" (v0.1.1-0.20190429073117-b5426c86b553) -# * a90cfd2 (tag: v0.1.0) -# * 30950c0 - -# When requesting master as specific version, a pseudo version is created with a -# higher version than the latest tag. Listing upgrades doesn't suggest the lower -# version as upgrade. go get -m example.com/pseudoupgrade@b5426c8 go list -m -u all stdout '^example.com/pseudoupgrade v0.1.1-0.20190429073117-b5426c86b553$'