im trying to test PersistentActor with scalatest but I dont know how to point test code to use something like application-test.conf instead application.conf ( I want to change leveldb store for events to in memory store ). Is there any convenient way to do this?
Asked
Active
Viewed 1,572 times
1 Answers
15
You could define another application.conf
in your test resources:
src/test/resources/application.conf
This way, you can have test related configuration that will be used by default in your tests.
If you still require multiple configuration settings among your tests, you can always have more than one configuration file in the test resources and explicitly use the one you need:
class PersistentActorSpec extends TestKit(ActorSystem("test-system", ConfigFactory.load("application-test")))

Bianca Tesila
- 807
- 6
- 8