feat: clearly indicate which resolver we're using (#885)

See what we documented at https://github.com/ooni/spec/pull/257

Reference issue: https://github.com/ooni/probe/issues/2238

See also the related ooni/spec PR: https://github.com/ooni/spec/pull/257

See also https://github.com/ooni/probe/issues/2237

While there, bump webconnectivity@v0.5 version because this change
has an impact onto the generated data format.

The drop in coverage is unavoidable because we've written some
tests for `measurex` to ensure we deal with DNS resolvers and transport
names correctly depending on the splitting policy we use.

(However, `measurex` is only used for the `tor` experiment and, per
the step-by-step design document, new experiments should use
`measurexlite` instead, so this is hopefully fine(TM).)

While there, fix a broken integration test that does not run in `-short` mode.
This commit is contained in:
Simone Basso 2022-08-27 15:47:48 +02:00 committed by GitHub
commit 8a0c062844
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 362 additions and 59 deletions

View file

@ -11,6 +11,7 @@ import (
"time"
"github.com/ooni/probe-cli/v3/internal/model"
"github.com/ooni/probe-cli/v3/internal/tracex"
)
// WrapDNSXRoundTripper creates a new DNSXRoundTripper that
@ -42,7 +43,7 @@ func (txp *dnsxRoundTripperDB) RoundTrip(
response, err := txp.DNSTransport.RoundTrip(ctx, query)
finished := time.Since(txp.begin).Seconds()
txp.db.InsertIntoDNSRoundTrip(&DNSRoundTripEvent{
Network: txp.DNSTransport.Network(),
Network: tracex.ResolverNetworkAdaptNames(txp.DNSTransport.Network()),
Address: txp.DNSTransport.Address(),
Query: txp.maybeQueryBytes(query),
Started: started,