summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/miekg/dns/remote_test.go
blob: 4cf701fe43a660d3436250b2724ed6e12da6fd9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package dns

import "testing"

const LinodeAddr = "176.58.119.54:53"

func TestClientRemote(t *testing.T) {
	m := new(Msg)
	m.SetQuestion("go.dns.miek.nl.", TypeTXT)

	c := new(Client)
	r, _, err := c.Exchange(m, LinodeAddr)
	if err != nil {
		t.Errorf("failed to exchange: %v", err)
	}
	if r != nil && r.Rcode != RcodeSuccess {
		t.Errorf("failed to get an valid answer\n%v", r)
	}
}