blob: a48622814a251c1da5daf1908b032830f4a889f8 [file] [log] [blame]
env GO111MODULE=on
env proxy=$GOPROXY
# Proxy that can't serve should fail.
env GOPROXY=$proxy/404
! go get
stderr '404 Not Found'
# get should walk down the proxy list past 404 and 410 responses.
env GOPROXY=$proxy/404,$proxy/410,$proxy
go get
# get should not walk past other 4xx errors.
env GOPROXY=$proxy/403,$proxy
! go get
stderr 'reading.*/403/*: 403 Forbidden'
# get should not walk past non-4xx errors.
env GOPROXY=$proxy/500,$proxy
! go get
stderr 'reading.*/500/*: 500 Internal Server Error'
# get should return the final 404/410 if that's all we have.
env GOPROXY=$proxy/404,$proxy/410
! go get
stderr 'reading.*/410/*: 410 Gone'
-- go.mod --
module x