go/src/net/dnsclient_unix_test.go

var TestAddr

var TestAddr6

func mustNewName(name string) dnsmessage.Name {}

func mustQuestion(name string, qtype dnsmessage.Type, class dnsmessage.Class) dnsmessage.Question {}

var dnsTransportFallbackTests

func TestDNSTransportFallback(t *testing.T) {}

func TestDNSTransportNoFallbackOnTCP(t *testing.T) {}

var specialDomainNameTests

func TestSpecialDomainName(t *testing.T) {}

// Issue 13705: don't try to resolve onion addresses, etc
func TestAvoidDNSName(t *testing.T) {}

func TestNameListAvoidDNS(t *testing.T) {}

var fakeDNSServerSuccessful

// Issue 13705: don't try to resolve onion addresses, etc
func TestLookupTorOnion(t *testing.T) {}

type resolvConfTest

func newResolvConfTest() (*resolvConfTest, error) {}

func (conf *resolvConfTest) write(lines []string) error {}

func (conf *resolvConfTest) writeAndUpdate(lines []string) error {}

func (conf *resolvConfTest) writeAndUpdateWithLastCheckedTime(lines []string, lastChecked time.Time) error {}

func (conf *resolvConfTest) forceUpdate(name string, lastChecked time.Time) error {}

func (conf *resolvConfTest) forceUpdateConf(c *dnsConfig, lastChecked time.Time) bool {}

func (conf *resolvConfTest) servers() []string {}

func (conf *resolvConfTest) teardown() error {}

var updateResolvConfTests

func TestUpdateResolvConf(t *testing.T) {}

var goLookupIPWithResolverConfigTests

func TestGoLookupIPWithResolverConfig(t *testing.T) {}

// Test that goLookupIPOrder falls back to the host file when no DNS servers are available.
func TestGoLookupIPOrderFallbackToFile(t *testing.T) {}

// Issue 12712.
// When using search domains, return the error encountered
// querying the original name instead of an error encountered
// querying a generated name.
func TestErrorForOriginalNameWhenSearching(t *testing.T) {}

// Issue 15434. If a name server gives a lame referral, continue to the next.
func TestIgnoreLameReferrals(t *testing.T) {}

func BenchmarkGoLookupIP(b *testing.B) {}

func BenchmarkGoLookupIPNoSuchHost(b *testing.B) {}

func BenchmarkGoLookupIPWithBrokenNameServer(b *testing.B) {}

type fakeDNSServer

func (server *fakeDNSServer) DialContext(_ context.Context, n, s string) (Conn, error) {}

type fakeDNSConn

func (f *fakeDNSConn) Close() error {}

func (f *fakeDNSConn) Read(b []byte) (int, error) {}

func (f *fakeDNSConn) Write(b []byte) (int, error) {}

func (f *fakeDNSConn) SetDeadline(t time.Time) error {}

type fakeDNSPacketConn

func (f *fakeDNSPacketConn) SetDeadline(t time.Time) error {}

func (f *fakeDNSPacketConn) Close() error {}

// UDP round-tripper algorithm should ignore invalid DNS responses (issue 13281).
func TestIgnoreDNSForgeries(t *testing.T) {}

// Issue 16865. If a name server times out, continue to the next.
func TestRetryTimeout(t *testing.T) {}

func TestRotate(t *testing.T) {}

func testRotate(t *testing.T, rotate bool, nameservers, wantServers []string) {}

func mockTXTResponse(q dnsmessage.Message) dnsmessage.Message {}

// Issue 17448. With StrictErrors enabled, temporary errors should make
// LookupIP fail rather than return a partial result.
func TestStrictErrorsLookupIP(t *testing.T) {}

// Issue 17448. With StrictErrors enabled, temporary errors should make
// LookupTXT stop walking the search list.
func TestStrictErrorsLookupTXT(t *testing.T) {}

// Test for a race between uninstalling the test hooks and closing a
// socket connection. This used to fail when testing with -race.
func TestDNSGoroutineRace(t *testing.T) {}

func lookupWithFake(fake fakeDNSServer, name string, typ dnsmessage.Type) error {}

// Issue 8434: verify that Temporary returns true on an error when rcode
// is SERVFAIL
func TestIssue8434(t *testing.T) {}

func TestIssueNoSuchHostExists(t *testing.T) {}

// TestNoSuchHost verifies that tryOneName works correctly when the domain does
// not exist.
//
// Issue 12778: verify that NXDOMAIN without RA bit errors as "no such host"
// and not "server misbehaving"
//
// Issue 25336: verify that NXDOMAIN errors fail fast.
//
// Issue 27525: verify that empty answers fail fast.
func TestNoSuchHost(t *testing.T) {}

// Issue 26573: verify that Conns that don't implement PacketConn are treated
// as streams even when udp was requested.
func TestDNSDialTCP(t *testing.T) {}

// Issue 27763: verify that two strings in one TXT record are concatenated.
func TestTXTRecordTwoStrings(t *testing.T) {}

// Issue 29644: support single-request resolv.conf option in pure Go resolver.
// The A and AAAA queries will be sent sequentially, not in parallel.
func TestSingleRequestLookup(t *testing.T) {}

// Issue 29358. Add configuration knob to force TCP-only DNS requests in the pure Go resolver.
func TestDNSUseTCP(t *testing.T) {}

func TestDNSUseTCPTruncated(t *testing.T) {}

// Issue 34660: PTR response with non-PTR answers should ignore non-PTR
func TestPTRandNonPTR(t *testing.T) {}

func TestCVE202133195(t *testing.T) {}

func TestNullMX(t *testing.T) {}

func TestRootNS(t *testing.T) {}

func TestGoLookupIPCNAMEOrderHostsAliasesFilesOnlyMode(t *testing.T) {}

func TestGoLookupIPCNAMEOrderHostsAliasesFilesDNSMode(t *testing.T) {}

var goLookupIPCNAMEOrderDNSFilesModeTests

func TestGoLookupIPCNAMEOrderHostsAliasesDNSFilesMode(t *testing.T) {}

func testGoLookupIPCNAMEOrderHostsAliases(t *testing.T, mode hostLookupOrder, lookup, lookupRes string) {}

// Test that we advertise support for a larger DNS packet size.
// This isn't a great test as it just tests the dnsmessage package
// against itself.
func TestDNSPacketSize(t *testing.T) {}

func testDNSPacketSize(t *testing.T, disable bool) {}

func TestLongDNSNames(t *testing.T) {}

func TestDNSTrustAD(t *testing.T) {}

func TestDNSConfigNoReload(t *testing.T) {}

func TestLookupOrderFilesNoSuchHost(t *testing.T) {}

func TestExtendedRCode(t *testing.T) {}