AdGuardHome/home/dns_test.go

18 lines
341 B
Go
Raw Normal View History

package home
2019-06-04 20:38:53 +03:00
import (
2019-10-02 16:59:34 +03:00
"os"
2019-06-04 20:38:53 +03:00
"testing"
)
func TestResolveRDNS(t *testing.T) {
2019-10-02 16:59:34 +03:00
_ = os.RemoveAll(config.getDataDir())
defer func() { _ = os.RemoveAll(config.getDataDir()) }()
2019-05-30 15:36:39 +03:00
config.DNS.BindHost = "1.1.1.1"
initDNSServer()
if r := config.dnsctx.rdns.resolve("1.1.1.1"); r != "one.one.one.one" {
t.Errorf("resolveRDNS(): %s", r)
}
}