gomega icon indicating copy to clipboard operation
gomega copied to clipboard

Support configuration outside of suites

Open Airblader opened this issue 2 years ago • 2 comments

https://github.com/onsi/gomega/pull/273 implemented a feature to make some things configurable, which is great. The problem is that we need to do this in every test suite such that it works regardless of which one we execute (during development). It would be great if this could be done in a more global way; some brainstorming:

  1. Configuration through environment variables (probably not the greatest)
  2. Configuration through a config file
  3. Custom template for the Ginkgo CLI (<- not preferred since I personally don't use it to create new suites anyway).
  4. ...?

Airblader avatar Sep 02 '22 13:09 Airblader

I think config files will be the future for this sort of stuff in both ginkgo and gomega. But it's not a super high priority at the moment :/

onsi avatar Sep 02 '22 13:09 onsi

Totally understandable, just wanted to raise it for visibility. Thanks for the quick response!

Our solution for now is a shared setup function that we call from all suite definitions. It's not ideal since it relies on convention, but how the string comparisons are formatted is also not exactly a life-or-death thing.

Airblader avatar Sep 02 '22 13:09 Airblader