]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: remove unused (*testgoData).FailSSH test helper
authorTobias Klauser <tklauser@distanz.ch>
Wed, 6 Sep 2023 09:31:53 +0000 (11:31 +0200)
committerGopher Robot <gobot@golang.org>
Thu, 7 Sep 2023 00:53:03 +0000 (00:53 +0000)
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 <bcmills@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/cmd/go/go_test.go
src/cmd/go/testdata/failssh/ssh [deleted file]

index 5492b04c321153246c67f471e15e4a596c66c7b4..3cb6131e8cb2b5df441cc35db660f32e8dc4c2fc 100644 (file)
@@ -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 (executable)
index ecdbef9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exit 1