Text file src/cmd/go/testdata/script/get_insecure.txt

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

View as plain text