mirror of https://github.com/golang/go.git
cmd/go: fix sumdb test failure with misbehaving DNS server
Broadened the regular expression used to test error messages for failing to connect to "localhost.localdev/sumdb". Some DNS servers resolve unknown domains like "localhost.localdev" to real IP addresses to serve ads. We may get a variety of error messages. Fixes #31779 Change-Id: Ib389c633c9a9f70f8e89bbcba5282a375da4e708 Reviewed-on: https://go-review.googlesource.com/c/go/+/182799 Run-TryBot: Jay Conrod <jayconrod@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
cb0f0d6cf1
commit
2ba9f7c245
|
|
@ -17,11 +17,14 @@ rm $GOPATH/pkg/mod/download/cache/sumdb
|
|||
rm go.sum
|
||||
|
||||
# direct access fails (because localhost.localdev does not exist)
|
||||
# The text of the error message is hard to predict because some DNS servers
|
||||
# will resolve unknown domains like localhost.localdev to a real IP
|
||||
# to serve ads.
|
||||
cp go.mod.orig go.mod
|
||||
env GOSUMDB=$sumdb
|
||||
env GOPROXY=direct
|
||||
! go get -d rsc.io/fortune@v1.0.0
|
||||
stderr 'verifying.*lookup.*localhost.localdev'
|
||||
stderr 'verifying.*localhost.localdev'
|
||||
rm $GOPATH/pkg/mod/download/cache/sumdb
|
||||
rm go.sum
|
||||
|
||||
|
|
@ -30,7 +33,7 @@ cp go.mod.orig go.mod
|
|||
env GOSUMDB=$sumdb
|
||||
env GOPROXY=$proxy/sumdb-404
|
||||
! go get -d rsc.io/fortune@v1.0.0
|
||||
stderr 'verifying.*lookup.*localhost.localdev'
|
||||
stderr 'verifying.*localhost.localdev'
|
||||
rm $GOPATH/pkg/mod/download/cache/sumdb
|
||||
rm go.sum
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue