Skip to content

Commit a16d489

Browse files
Bryan C. Millsdr2chase
Bryan C. Mills
authored andcommitted
[release-branch.go1.19] cmd/go: remove tests that assume lack of new versions of external modules
In general it seems ok to assume that an open-source module that did exist will continue to do so — after all, users of open-source modules already do that all the time. However, we should not assume that those modules do not publish new versions — that's really up to their maintainers to decide. Two existing tests did make that assumption for the module gopkg.in/natefinch/lumberjack.v2. Let's remove those two tests. If we need to replace them at some point, we can replace them with hermetic test-only modules (#54503) or perhaps modules owned by the Go project. Updates #58445. Fixes #58449. Change-Id: Ica8fe587d86fc41f3d8445a4cd2b8820455ae45f Reviewed-on: https://go-review.googlesource.com/c/go/+/466862 Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
1 parent 34edacc commit a16d489

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/cmd/go/internal/modfetch/coderepo_test.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -378,18 +378,6 @@ var codeRepoTests = []codeRepoTest{
378378
zipSum: "h1:YJYZRsM9BHFTlVr8YADjT0cJH8uFIDtoc5NLiVqZEx8=",
379379
zipFileHash: "c15e49d58b7a4c37966cbe5bc01a0330cd5f2927e990e1839bda1d407766d9c5",
380380
},
381-
{
382-
vcs: "git",
383-
path: "gopkg.in/natefinch/lumberjack.v2",
384-
rev: "latest",
385-
version: "v2.0.0-20170531160350-a96e63847dc3",
386-
name: "a96e63847dc3c67d17befa69c303767e2f84e54f",
387-
short: "a96e63847dc3",
388-
time: time.Date(2017, 5, 31, 16, 3, 50, 0, time.UTC),
389-
gomod: "module gopkg.in/natefinch/lumberjack.v2\n",
390-
zipSum: "h1:AFxeG48hTWHhDTQDk/m2gorfVHUEa9vo3tp3D7TzwjI=",
391-
zipFileHash: "b5de0da7bbbec76709eef1ac71b6c9ff423b9fbf3bb97b56743450d4937b06d5",
392-
},
393381
{
394382
vcs: "git",
395383
path: "gopkg.in/natefinch/lumberjack.v2",
@@ -792,11 +780,6 @@ var codeRepoVersionsTests = []struct {
792780
path: "swtch.com/testmod",
793781
versions: []string{"v1.0.0", "v1.1.1"},
794782
},
795-
{
796-
vcs: "git",
797-
path: "gopkg.in/natefinch/lumberjack.v2",
798-
versions: []string{"v2.0.0"},
799-
},
800783
{
801784
vcs: "git",
802785
path: "vcs-test.golang.org/git/odd-tags.git",

0 commit comments

Comments
 (0)