cleanup: doh.powerdns.org is not working anymore (#924)

While there, `.../internal/sessionresolver` => `.../sessionresolver`

See https://github.com/ooni/probe/issues/2255
This commit is contained in:
Simone Basso 2022-09-02 14:44:23 +02:00 committed by GitHub
commit 1153850aca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 3 additions and 23 deletions

View file

@ -0,0 +1,32 @@
package sessionresolver_test
import (
"context"
"testing"
"github.com/ooni/probe-cli/v3/internal/engine/sessionresolver"
"github.com/ooni/probe-cli/v3/internal/kvstore"
)
func TestSessionResolverGood(t *testing.T) {
if testing.Short() {
t.Skip("skip test in short mode")
}
reso := &sessionresolver.Resolver{
KVStore: &kvstore.Memory{},
}
defer reso.CloseIdleConnections()
if reso.Network() != "sessionresolver" {
t.Fatal("unexpected Network")
}
if reso.Address() != "" {
t.Fatal("unexpected Address")
}
addrs, err := reso.LookupHost(context.Background(), "google.com")
if err != nil {
t.Fatal(err)
}
if len(addrs) < 1 {
t.Fatal("expected some addrs here")
}
}