cleanup(netx): stop using most netxlite resolver internals (#797)

This diff modifies netx to stop using most netxlite resolver internals
but the internal function that creates a new, unwrapped system resolver,
which will be dealt with in a subsequent pull request.

See https://github.com/ooni/probe/issues/2121
This commit is contained in:
Simone Basso 2022-06-05 19:52:39 +02:00 committed by GitHub
commit 2d3d5d9cdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 243 deletions

View file

@ -62,6 +62,10 @@ func TestBogonResolver(t *testing.T) {
if !errors.Is(err, ErrDNSBogon) {
t.Fatal("unexpected err", err)
}
var ew *ErrWrapper
if !errors.As(err, &ew) {
t.Fatal("error has not been wrapped")
}
if len(addrs) > 0 {
t.Fatal("expected no addrs")
}