aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/get_insecure.txt
blob: 69930f7107a58b9ddeb4729b313ccb8cc999969e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# 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 GOINSECURE (should succeed).
env GOINSECURE=insecure.go-get-issue-15410.appspot.com
go get -d insecure.go-get-issue-15410.appspot.com/pkg/p

# GOPATH: Try updating without GOINSECURE (should fail).
env GOINSECURE=''
! 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 GOINSECURE (should succeed).
env GOINSECURE=insecure.go-get-issue-15410.appspot.com
env GONOSUMDB=insecure.go-get-issue-15410.appspot.com
go get -d insecure.go-get-issue-15410.appspot.com/pkg/p

# Modules: Try updating without GOINSECURE (should fail).
env GOINSECURE=''
env GONOSUMDB=''
! 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