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