...
1# Test for #15410
2[short] skip 'builds a go program and a git repo'
3[!git] skip
4
5env PATH=$WORK/tmp/bin${:}$PATH
6go build -o $WORK/tmp/bin/ssh ssh.go
7
8# Modules: Set up
9env GOPATH=$WORK/m/gp
10mkdir $WORK/m
11cp module_file $WORK/m/go.mod
12cd $WORK/m
13env GOPROXY=${GOPROXY},direct
14
15# Modules: Try go get of HTTP-only repo (should fail).
16! go get -d vcs-test.golang.org/insecure/go/insecure@6fecd21
17
18# Modules: Try again with GOINSECURE (should succeed).
19env GOINSECURE=vcs-test.golang.org/insecure/go/insecure
20env GONOSUMDB=vcs-test.golang.org/insecure
21go get -d vcs-test.golang.org/insecure/go/insecure@6fecd21
22
23# Modules: Try updating without GOINSECURE (should fail).
24env GOINSECURE=''
25env GONOSUMDB=''
26! go get -d -u -f vcs-test.golang.org/insecure/go/insecure@6fecd21
27
28go list -m ...
29stdout 'vcs-test.golang.org/insecure/go/insecure'
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