mirror of
https://github.com/AdguardTeam/dnsproxy.git
synced 2026-10-12 02:01:26 +00:00
21 lines
422 B
Go
21 lines
422 B
Go
package proxy_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/AdguardTeam/dnsproxy/proxy"
|
|
"github.com/miekg/dns"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestProxy_HandleDNSRequest_udp(t *testing.T) {
|
|
dnsProxy := mustStartDefaultProxy(t)
|
|
|
|
// Create a DNS-over-UDP client connection
|
|
addr := dnsProxy.Addr(proxy.ProtoUDP)
|
|
conn, err := dns.Dial("udp", addr.String())
|
|
require.NoError(t, err)
|
|
|
|
sendTestMessages(t, conn)
|
|
}
|