question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using envFileName in IntegrationTests

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
slavaschmidtcommented, Oct 5, 2019

@Philippus Should work out of the box, I’ll extend the scripted test to make sure it does.

0reactions
Philippuscommented, Jan 24, 2020

Thank you, good to know! Fixed in https://github.com/mefellows/sbt-dotenv/pull/42/

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found