I have a fairly large codebase with many files and many tests.
For whatever reasons that happened over the years, some tests execute code that does call an external APIs. It’s not easy to spot these tests (they pop up only when something breaks), these calls often come from some deep code using different http libraries.
I wonder if there is a way to somehow setup beam to filter TCP traffic - disable all network access except for e.g. localhost:5432 (postgres) during tests. It could be useful especially on the CI (Locally one can disconnect internet and then try to find these bad tests)
tl;dr - Is there any way to block (or log) all external TCP traffic on the beam level?