In my app i have runtime config initialization based on SCALA_ENV variable
In build.sbt i need to check if SCALA_ENV var is set, and if not set it to "test" but only for tests configuration, so that when
sbt test
is run locally on a developer machine without explicitly setting SCALA_ENV it would always use test environment configs
I tried
fork in test := true
envVars in Test := Map("SCALA_ENV" -> "test")
And then later somewhere in tests
System.getenv("SCALA_ENV")
But it always returns null...