ooni / probe

OONI Probe network measurement tool for detecting internet censorship
https://ooni.org/install
BSD 3-Clause "New" or "Revised" License
754 stars 142 forks source link

dslx: use model.UnderlyingNetwork for testing #2582

Closed bassosimone closed 11 months ago

bassosimone commented 11 months ago

This issue is about cleaning up how we run tests for dslx. We want to use dslx in the oohelperd. To this end, we need to pass a custom model.UnderlyingNetwork because the oohelperd code cannot use the singleton in netxlite. In fact, when testing with netemx and using the oohelperd, we need a different emulated network than the probe one.

To make using dslx in oohelperd possible, we need to avoid using the netxlite singleton. Incidentally, by doing that, we also reduce some complexity in the implementation. Now we don't need custom mocks for each network operation.