You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You should consider your environment and your application configuration to be two different things. You may derive a configuration from the environment, but they should not be viewed as equivalent.
Ideally you should have some function that, given a configuration map, creates your application. This means you can populate it with environment variables, or, in the case of tests, with test data instead.
Thanks for the quick response and clarification. I now completely understand your thinking and the position of this library. I really appreciate your thought and efforts putting in it. Thank you.
Environment has been an easy go-to place for my team allowing different setup between among member development machines and also production system. I can't think of many things in my day to day development that can be categorized as environment but not application configuration, so to me separating them seems to be unnecessary more work. But anyway, I'll find the other way around this myself.
In my development workflow, I normally run my tests in the repl with
(run-tests)
. Assume that my profiles.clj has this content:lein test
,database-url
from:test
is used as expected:database-url
from:dev
.I know that env in
:dev
is loaded on repl start, they can't be modified and the(run-tests)
uses them.Is there a way to let
(run-tests)
uses env from:test
and at the same time same repl, if I eval code manually, env from:dev
are used?The text was updated successfully, but these errors were encountered: