`with-profile test` isn't on by default
AlexanderMann opened this issue · 4 comments
Motivation
I got thrown for a loop when with-profile test
wasn't being used by default.
https://circleci.com/gh/circleci/service-utils/48
Suggested Musical Pairing
The docs for Leiningen now specifically advise against using the test
profile, but it wouldn't hurt to add a line or two explaining the gotcha in the readme here.
@technomancy are you referring to this statement:
Please note that putting things in the :test profile is strongly advised against as it can result in tests which can't be run from the repl.
?
I can see the benefit for having more portable tests. Do you have any ideas on how to handle test specific configuration? That's what I was thinking of using the test profile for. Any thoughts? Thanks
brainstorm attempt 1:
- use a global fixture to change my project's resource-paths temporarily or inject a new test specific configuration state if using component or mount.
@leblowl right... I think there are ways to do this that are reasonable and don't involve Leiningen profiles.
I don't think it's a good idea to have a separate config for tests vs repl stuff, but if you really decide you want it then you can find a way to make it work with fixtures or some other mechanism. Describing how this would work is out of scope though, because it heavily depends upon how your application is configured.