Using envFileName in IntegrationTests
See original GitHub issueI’m not sure if it is something I’m doing wrong, but I’m unable to override the envfile for integration tests.
I have this:
envFileName in Test := ".env.test"
envFileName in IntegrationTest := ".env.it"
When I run sbt test the correct env file is used, however when I run sbt it:test the default .env file is used.
Is it an issue in the plugin or something I’m doing wrong?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Using .env files for unit testing with jest - Stack Overflow
if you are like me trying to find a way to change the dotenv config path to use .env.test instead of .env ,...
Read more >Spring Boot : Integration tests with environment variables
@TestPropertySource is a class-level annotation that is used to configure the locations() of properties files and inlined properties() to be ...
Read more >Using multiple .env files. - Prisma
One solution is to have multiple .env files which each represent different environments. In practice this means you create a file for each...
Read more >Environment variables in Compose | Docker Documentation
How to set, use and manage environment variables in Compose. ... By passing the file as an argument, you can store it anywhere...
Read more >Philippus/sbt-dotenv - GitHub
Create a .env file in the root of your project with some environment specific ... IntegrationTest / envFileName := "test.env" // optional IntegrationTest...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@Philippus Should work out of the box, I’ll extend the scripted test to make sure it does.
Thank you, good to know! Fixed in https://github.com/mefellows/sbt-dotenv/pull/42/