mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-06 16:02:55 +03:00
Pull request: * all: move internal Go packages to internal/
Merge in DNS/adguard-home from 2234-move-to-internal to master Squashed commit of the following: commit d26a288cabeac86f9483fab307677b1027c78524 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Oct 30 12:44:18 2020 +0300 * all: move internal Go packages to internal/ Closes #2234.
This commit is contained in:
parent
df3fa595a2
commit
ae8de95d89
125 changed files with 85 additions and 85 deletions
internal/home
21
internal/home/rdns_test.go
Normal file
21
internal/home/rdns_test.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
package home
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestResolveRDNS(t *testing.T) {
|
||||
dns := &dnsforward.Server{}
|
||||
conf := &dnsforward.ServerConfig{}
|
||||
conf.UpstreamDNS = []string{"8.8.8.8"}
|
||||
err := dns.Prepare(conf)
|
||||
assert.True(t, err == nil, "%s", err)
|
||||
|
||||
clients := &clientsContainer{}
|
||||
rdns := InitRDNS(dns, clients)
|
||||
r := rdns.resolve("1.1.1.1")
|
||||
assert.True(t, r == "one.one.one.one", "%s", r)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue