]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgo/go/cmd/go/testdata/script/mod_get_svn.txt
libgo: update to Go1.14beta1
[thirdparty/gcc.git] / libgo / go / cmd / go / testdata / script / mod_get_svn.txt
index cd19d99dbccbbf27076af73c02b417118291ebc2..3817fce9b61f87ee027b88c68bcd1ad87fbc199a 100644 (file)
@@ -1,17 +1,27 @@
 [!net] skip
 [!exec:svn] skip
 
+# 'go get' will fall back to svn+ssh once svn fails over protocols like https.
+# If vcs-test.golang.org isn't in the user's known_hosts file, this will result
+# in an ssh prompt, which will stop 'go test' entirely
+#
+# Unfortunately, there isn't a way to globally disable host checking for ssh,
+# without modifying the real system's or user's configs. Changing $HOME won't
+# affect ssh either, as it ignores the environment variable entirely.
+#
+# However, a useful trick is pointing SVN_SSH to a program that doesn't exist,
+# resulting in svn skipping ssh entirely. Alternatives like
+# SVN_SSH="ssh -o StrictHostKeyChecking=no" didn't avoid the prompt.
+env SVN_SSH="svn_do_not_use_ssh"
+
 env GO111MODULE=on
 env GOPROXY=direct
 env GOSUMDB=off
 
-# Attempting to get a module zip using svn should fail with a reasonable
-# message instead of a panic.
-# TODO(golang.org/issue/26092): Really, it shouldn't fail at all.
-! go get -d vcs-test.golang.org/svn/hello.svn
-stderr 'ReadZip not implemented for svn'
-! go install .
-stderr 'ReadZip not implemented for svn'
+# Attempting to get a module zip using svn should succeed.
+go get vcs-test.golang.org/svn/hello.svn@000000000001
+exists $GOPATH/pkg/mod/cache/download/vcs-test.golang.org/svn/hello.svn/@v/v0.0.0-20170922011245-000000000001.zip
+exists $GOPATH/bin/hello.svn$GOEXE
 
 # Attempting to get a nonexistent module using svn should fail with a
 # reasonable message instead of a panic.
@@ -21,7 +31,6 @@ stderr 'go get vcs-test.golang.org/svn/nonexistent.svn: no matching versions for
 
 -- go.mod --
 module golang/go/issues/28943/main
--- main.go --
-package main
-import _ "vcs-test.golang.org/svn/hello.svn"
-func main() {}
+-- go.sum --
+vcs-test.golang.org/svn/hello.svn v0.0.0-20170922011245-000000000001 h1:rZjvboXMfQICKXdhx/QHqJ2Y/AQsJVrXnwGqwcTxQiw=
+vcs-test.golang.org/svn/hello.svn v0.0.0-20170922011245-000000000001/go.mod h1:0memnh/BRLuxiK2zF4rvUgz6ts/fhhB28l3ULFWPusc=