blob: 36ad2c05b7b997e30ba667a863f37f315e311bbd [file] [log] [blame]
# TODO(matloob): Split this test into two? It's one of the slowest tests we have.
[!net] skip
[!exec:git] skip
env PATH=$WORK/tmp/bin${:}$PATH
go build -o $WORK/tmp/bin/ssh ssh.go
# GOPATH: Set up
env GO111MODULE=off
# GOPATH: Try go get -d of HTTP-only repo (should fail).
! go get -d insecure.go-get-issue-15410.appspot.com/pkg/p
# GOPATH: Try again with -insecure (should succeed).
go get -d -insecure insecure.go-get-issue-15410.appspot.com/pkg/p
# GOPATH: Try updating without -insecure (should fail).
! go get -d -u -f insecure.go-get-issue-15410.appspot.com/pkg/p
# Modules: Set up
env GOPATH=$WORK/m/gp
mkdir $WORK/m
cp module_file $WORK/m/go.mod
cd $WORK/m
env GO111MODULE=on
env GOPROXY=''
# Modules: Try go get -d of HTTP-only repo (should fail).
! go get -d insecure.go-get-issue-15410.appspot.com/pkg/p
# Modules: Try again with -insecure (should succeed).
go get -d -insecure insecure.go-get-issue-15410.appspot.com/pkg/p
# Modules: Try updating without -insecure (should fail).
! go get -d -u -f insecure.go-get-issue-15410.appspot.com/pkg/p
go list -m ...
stdout 'insecure.go-get-issue'
-- ssh.go --
// stub out uses of ssh by go get
package main
import "os"
func main() {
os.Exit(1)
}
-- module_file --
module m