richardartoul / nola

MIT License
74 stars 6 forks source link

Quality of life improvements to make writing apps + tests easier #51

Closed richardartoul closed 1 year ago

richardartoul commented 1 year ago

This P.R includes a variety of quality of life improvements that make it easier to use NOLA in tests and actual applications with minimal differences between production configuration and test configuration.

Specifically it:

  1. Add some convenience functions for instantiating DNS-backed virtual environment in the virtual package.
  2. Makes it possible to register Go modules with the virtual environment at any time (via a method call) instead of just when the virtual environment is created which makes sharing a single virtual environment among many different packages in an application much easier.
  3. Ensures that if environments/dnsregistry are created with "localhost" as the hostname some magic stuff happens to make everything "just work" in a single node / unit test setup.