From bc2095280e4f607c30397a15a89ca8347b019918 Mon Sep 17 00:00:00 2001 From: Mateusz Poliwczak Date: Mon, 15 May 2023 09:33:40 +0000 Subject: [PATCH] net: root the nodata test domain to avoid search domains I came across similar issue in CL 455275. Without rooting this, the search domains might affect the query, so the test might not prove the right thing. The search domain will cause a change from no data to NXDOMAIN error. Change-Id: I59f4de2635f03c69adf29b74e25e4ebd71e7413b GitHub-Last-Rev: 3a086c74f1453e4d1f2e88631ac835389984da17 GitHub-Pull-Request: golang/go#60197 Reviewed-on: https://go-review.googlesource.com/c/go/+/494896 Run-TryBot: Dmitri Shuralyov Reviewed-by: Heschi Kreinick TryBot-Result: Gopher Robot Reviewed-by: Ian Lance Taylor Auto-Submit: Dmitri Shuralyov --- src/net/lookup_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/lookup_test.go b/src/net/lookup_test.go index 0ea681f834..0689c19c3c 100644 --- a/src/net/lookup_test.go +++ b/src/net/lookup_test.go @@ -1425,7 +1425,7 @@ func testLookupNoData(t *testing.T, prefix string) { for { // Domain that doesn't have any A/AAAA RRs, but has different one (in this case a TXT), // so that it returns an empty response without any error codes (NXDOMAIN). - _, err := LookupHost("golang.rsc.io") + _, err := LookupHost("golang.rsc.io.") if err == nil { t.Errorf("%v: unexpected success", prefix) return -- 2.48.1