feat(netxlite): implements NS queries (#734)
This diff has been extracted from eb0bf38957.
See https://github.com/ooni/probe/issues/2096.
While there, skip the broken tests caused by issue
https://github.com/ooni/probe/issues/2098.
This commit is contained in:
parent
c1b06a2d09
commit
ce052b665e
26 changed files with 859 additions and 75 deletions
|
|
@ -343,3 +343,27 @@ func TestShouldSkipWithProxyWorks(t *testing.T) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestUnimplementedFunctions(t *testing.T) {
|
||||
t.Run("LookupHTTPS", func(t *testing.T) {
|
||||
r := &Resolver{}
|
||||
https, err := r.LookupHTTPS(context.Background(), "dns.google")
|
||||
if !errors.Is(err, errNotImplemented) {
|
||||
t.Fatal("unexpected error", err)
|
||||
}
|
||||
if https != nil {
|
||||
t.Fatal("expected nil result")
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("LookupNS", func(t *testing.T) {
|
||||
r := &Resolver{}
|
||||
ns, err := r.LookupNS(context.Background(), "dns.google")
|
||||
if !errors.Is(err, errNotImplemented) {
|
||||
t.Fatal("unexpected error", err)
|
||||
}
|
||||
if len(ns) > 0 {
|
||||
t.Fatal("expected empty result")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue