Right, so you most likely have an umbrella app. Umbrella apps share the configuration, so you end up with precisely the above problem.
Our app is just a folder with 3 apps now, and we require the core from ui as a dep (with path: "../core") in mix.exs, and do similar with core and db apps.
This allows us to have different configuration for test env: in core we use Mox, but in ui we don’t.
In a nutshell, we treat the other apps as if they were library dependencies. So we do have some duplication in configs, i.e. config for ui configures all 3 apps, config for core configures core and db etc.
There is a nice advantage of that: you test the db app in isolation from rest of the system, the core app is not aware at all about existence of ui. Nice bounded contexts ![]()






















