New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: more complete DNS stub resolver tests for uncommon scenarios #13295

Open
danp opened this Issue Nov 17, 2015 · 2 comments

Comments

Projects
None yet
3 participants
@danp
Contributor

danp commented Nov 17, 2015

In working on #12778 I found there is not an easy way to test more uncommon DNS scenarios where tight control of responses and errors is needed.

For the pure Go stub resolver consider restructuring things to make this easier, such as with the ability to swap out real TCP/UDP connections for a stub so tight control is possible while still exercising the bulk of code.

@mdempsky mentioned considering possibly related restructuring for #13281.

@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Nov 17, 2015

@gopherbot

This comment has been minimized.

gopherbot commented Nov 19, 2015

CL https://golang.org/cl/16953 mentions this issue.

rsc added a commit that referenced this issue Dec 17, 2015

net: prefer error for original name on lookups
With certain names and search domain configurations the
returned error would be one encountered while querying a
generated name instead of the original name. This caused
confusion when a manual check of the same name produced
different results.

Now prefer errors encountered for the original name.

Also makes the low-level DNS connection plumbing swappable
in tests enabling tighter control over responses without
relying on the network.

Fixes #12712
Updates #13295

Change-Id: I780d628a762006bb11899caf20b5f97b462a717f
Reviewed-on: https://go-review.googlesource.com/16953
Reviewed-by: Russ Cox <rsc@golang.org>
@gopherbot

This comment has been minimized.

gopherbot commented Mar 28, 2018

Change https://golang.org/cl/102875 mentions this issue: dns/dnstest: new package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment