1 # TODO(matloob): Split this test into two? It's one of the slowest tests we have.
2
3 [!net] skip
4 [!exec:git] skip
5
6 env PATH=$WORK/tmp/bin${:}$PATH
7 go build -o $WORK/tmp/bin/ssh ssh.go
8
9 # GOPATH: Set up
10 env GO111MODULE=off
11
12 # GOPATH: Try go get -d of HTTP-only repo (should fail).
13 ! go get -d insecure.go-get-issue-15410.appspot.com/pkg/p
14
15 # GOPATH: Try again with GOINSECURE (should succeed).
16 env GOINSECURE=insecure.go-get-issue-15410.appspot.com
17 go get -d insecure.go-get-issue-15410.appspot.com/pkg/p
18
19 # GOPATH: Try updating without GOINSECURE (should fail).
20 env GOINSECURE=''
21 ! go get -d -u -f insecure.go-get-issue-15410.appspot.com/pkg/p
22
23 # Modules: Set up
24 env GOPATH=$WORK/m/gp
25 mkdir $WORK/m
26 cp module_file $WORK/m/go.mod
27 cd $WORK/m
28 env GO111MODULE=on
29 env GOPROXY=''
30
31 # Modules: Try go get -d of HTTP-only repo (should fail).
32 ! go get -d insecure.go-get-issue-15410.appspot.com/pkg/p
33
34 # Modules: Try again with GOINSECURE (should succeed).
35 env GOINSECURE=insecure.go-get-issue-15410.appspot.com
36 env GONOSUMDB=insecure.go-get-issue-15410.appspot.com
37 go get -d insecure.go-get-issue-15410.appspot.com/pkg/p
38
39 # Modules: Try updating without GOINSECURE (should fail).
40 env GOINSECURE=''
41 env GONOSUMDB=''
42 ! go get -d -u -f insecure.go-get-issue-15410.appspot.com/pkg/p
43
44 go list -m ...
45 stdout 'insecure.go-get-issue'
46
47 -- ssh.go --
48 // stub out uses of ssh by go get
49 package main
50
51 import "os"
52
53 func main() {
54 os.Exit(1)
55 }
56 -- module_file --
57 module m
58
View as plain text