From 0eed32bd0d3fa713a4f5077462e402119dc761cb Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 6 Sep 2023 11:31:53 +0200 Subject: [PATCH] cmd/go: remove unused (*testgoData).FailSSH test helper The last remaining user was removed by CL 213829. Change-Id: Ic788b22b2de0d20e5fa096d137536d3b5c6d6c36 Reviewed-on: https://go-review.googlesource.com/c/go/+/525876 Reviewed-by: Bryan Mills Auto-Submit: Tobias Klauser Reviewed-by: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI --- src/cmd/go/go_test.go | 12 ------------ src/cmd/go/testdata/failssh/ssh | 2 -- 2 files changed, 14 deletions(-) delete mode 100755 src/cmd/go/testdata/failssh/ssh diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go index 5492b04c32..3cb6131e8c 100644 --- a/src/cmd/go/go_test.go +++ b/src/cmd/go/go_test.go @@ -926,18 +926,6 @@ func removeAll(dir string) error { return robustio.RemoveAll(dir) } -// failSSH puts an ssh executable in the PATH that always fails. -// This is to stub out uses of ssh by go get. -func (tg *testgoData) failSSH() { - tg.t.Helper() - wd, err := os.Getwd() - if err != nil { - tg.t.Fatal(err) - } - fail := filepath.Join(wd, "testdata/failssh") - tg.setenv("PATH", fmt.Sprintf("%v%c%v", fail, filepath.ListSeparator, os.Getenv("PATH"))) -} - func TestNewReleaseRebuildsStalePackagesInGOPATH(t *testing.T) { if testing.Short() { t.Skip("skipping lengthy test in short mode") diff --git a/src/cmd/go/testdata/failssh/ssh b/src/cmd/go/testdata/failssh/ssh deleted file mode 100755 index ecdbef95dd..0000000000 --- a/src/cmd/go/testdata/failssh/ssh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exit 1