jakemcc / test-refresh

Refreshes and reruns clojure.tests in your project.
393 stars 28 forks source link

test-refresh loads configuration for dev profile while running after a repl is started #74

Closed anler closed 6 years ago

anler commented 6 years ago

What version of lein-test-refresh?

0.22.0

What version of Leiningen?

Leiningen 2.8.1 on Java 1.8.0_152 Java HotSpot(TM) 64-Bit Server VM

Can you recreate the issue with a minimal project?

Link to project replicating the issue

The issue is that, after starting test-refresh in the test profile, running a repl makes test-refresh to reload the project with the dev profile causing me issues, for example, such as running tests against the real database instead of the one used for testing.

If you can't do above, can you share your project.clj and project structure?

--

Thank you!

anler commented 6 years ago

After some further investigation, the issue is more with the integration with cprop, after running the repl cprop updates the .lein-env file with the dev profiles values causing the next run of test-refresh to use those instead of the dev ones.

anler commented 6 years ago

Issue fixed! I just needed to tell cprop to keep separated .lein-env files for each environment. I updated the project accordingly. Thank you!

jakemcc commented 6 years ago

@anler Just wanted to say thanks for bringing this up and digging into it. Very nice to come back from a vacation and see someone solve their own problem 😄 .

Thanks for using test-refresh!