From: Jay Conrod Date: Tue, 18 Jun 2019 19:31:18 +0000 (-0400) Subject: cmd/go: fix sumdb test failure with misbehaving DNS server X-Git-Tag: go1.13beta1~57 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2ba9f7c24559c0b024902029489062f239e8fcad;p=gostls13.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 Reviewed-by: Bryan C. Mills TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/go/testdata/script/mod_sumdb_proxy.txt b/src/cmd/go/testdata/script/mod_sumdb_proxy.txt index 52f6a10fba..6fbf7aeb8a 100644 --- a/src/cmd/go/testdata/script/mod_sumdb_proxy.txt +++ b/src/cmd/go/testdata/script/mod_sumdb_proxy.txt @@ -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