mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-22 21:15:35 +03:00
17 lines
341 B
Go
17 lines
341 B
Go
package home
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestResolveRDNS(t *testing.T) {
|
|
_ = os.RemoveAll(config.getDataDir())
|
|
defer func() { _ = os.RemoveAll(config.getDataDir()) }()
|
|
|
|
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)
|
|
}
|
|
}
|