mirror of
https://github.com/folbricht/routedns.git
synced 2026-01-01 07:01:55 -06:00
* Revert "Remove ODOH due to broken dependency (#425)"
This reverts commit 8eecee85ec.
* switch back to updated version of cloudflare/odoh-go that fixes broken dependencies (#427)
---------
Co-authored-by: Leonard Walter <50204487+LeonardWalter@users.noreply.github.com>
19 lines
479 B
Go
19 lines
479 B
Go
package rdns
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/miekg/dns"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestODOHClientSimple(t *testing.T) {
|
|
d, err := NewODoHClient("test-odoh", "https://odoh-noads-nl.alekberg.net/proxy", "https://odoh.cloudflare-dns.com/dns-query", "", DoHClientOptions{})
|
|
require.NoError(t, err)
|
|
q := new(dns.Msg)
|
|
q.SetQuestion("cloudflare.com.", dns.TypeA)
|
|
r, err := d.Resolve(q, ClientInfo{})
|
|
require.NoError(t, err)
|
|
require.NotEmpty(t, r.Answer)
|
|
}
|