ooni-probe-cli/internal/engine/netx/resolver
Simone Basso acef18a955
fix(netx): repair BogonResolver tests (#401)
The BogonResolver relied on its wrapper resolver to pass along the
list of addresses _and_ the error. But the idiomatic thing to do is
often to return `nil` when there is an error.

I broke this very fragile assumption in https://github.com/ooni/probe-cli/pull/399.

I could of course fix it, but this assumption is clearly wrong
and we should not allow such fragile code in the tree.

We are not using BogonIsError much in the tree. The only place in
which we're using it for measuring seems to be dnscheck.

It may be that this surprising behavior was what caused the issue at
https://github.com/ooni/probe/issues/1510 in the first place.

Regardless, let's remove fragile code and adjust the test that was
failing. Also that test is quick so it can run in `-short` mode.

Spotted while working on https://github.com/ooni/probe/issues/1505.
2021-06-25 11:51:10 +02:00
..
address_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
address.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
bogon_test.go fix(netx): repair BogonResolver tests (#401) 2021-06-25 11:51:10 +02:00
bogon.go fix(netx): repair BogonResolver tests (#401) 2021-06-25 11:51:10 +02:00
cache_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
cache.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
chain_test.go refactor: move tls handshaker to netxlite (#400) 2021-06-25 11:07:26 +02:00
chain.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
decoder_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
decoder.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
dnsoverhttps_test.go cleanup(all): stop using deprecated ioutil functions (#381) 2021-06-15 14:01:45 +02:00
dnsoverhttps.go fix(all): introduce and use iox.ReadAllContext (#379) 2021-06-15 11:57:40 +02:00
dnsovertcp_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
dnsovertcp.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
dnsoverudp_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
dnsoverudp.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
emitter_test.go cleanup: remove ConnID, DialID, TransactionID (#395) 2021-06-23 13:36:45 +02:00
emitter.go cleanup: remove ConnID, DialID, TransactionID (#395) 2021-06-23 13:36:45 +02:00
encoder_test.go Release 3.6.0 (#239) 2021-03-03 14:42:17 +01:00
encoder.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
errorwrapper_test.go cleanup: remove ConnID, DialID, TransactionID (#395) 2021-06-23 13:36:45 +02:00
errorwrapper.go cleanup: remove ConnID, DialID, TransactionID (#395) 2021-06-23 13:36:45 +02:00
fake_test.go refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
genreply_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
idna_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
idna.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
integration_test.go refactor: move tls handshaker to netxlite (#400) 2021-06-25 11:07:26 +02:00
resolver.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
saver_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
saver.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
serial_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
serial.go refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
tls_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00