...
1[!net:insecure.go-get-issue-15410.appspot.com] skip
2[!git] skip
3
4env PATH=$WORK/tmp/bin${:}$PATH
5go build -o $WORK/tmp/bin/ssh ssh.go
6
7# Modules: Set up
8env GOPATH=$WORK/m/gp
9mkdir $WORK/m
10cp module_file $WORK/m/go.mod
11cd $WORK/m
12env GO111MODULE=on
13env GOPROXY=''
14
15# Modules: Try go get -d of HTTP-only repo (should fail).
16! go get -d insecure.go-get-issue-15410.appspot.com/pkg/p
17
18# Modules: Try again with GOINSECURE (should succeed).
19env GOINSECURE=insecure.go-get-issue-15410.appspot.com
20env GONOSUMDB=insecure.go-get-issue-15410.appspot.com
21go get -d insecure.go-get-issue-15410.appspot.com/pkg/p
22
23# Modules: Try updating without GOINSECURE (should fail).
24env GOINSECURE=''
25env GONOSUMDB=''
26! go get -d -u -f insecure.go-get-issue-15410.appspot.com/pkg/p
27
28go list -m ...
29stdout 'insecure.go-get-issue'
30
31-- ssh.go --
32// stub out uses of ssh by go get
33package main
34
35import "os"
36
37func main() {
38 os.Exit(1)
39}
40-- module_file --
41module m
View as plain text