We recently made the decision to move our persistence from Cassandra to Postgres and, as such, we need a way to use H2 in our self-contained tests. We have the following configuration overrides present in our test setup:
override def additionalConfiguration: AdditionalConfiguration = super.additionalConfiguration ++ Configuration.from( Map( "db.default.driver" -> "org.h2.Driver", "db.default.url" -> "jdbc:h2:mem:test", "jdbc-defaults.slick.profile" -> "slick.jdbc.H2Profile$" ))
But when we attempt to run the tests we receive the following error:
com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'slick.profile'
Could not find a huge number of resources for using H2 with Lagom specifically, but every reference I could find on using H2 via Slick in Scala generally shows that this configuration is sensible, assuming that Lagom is forwarding the configuration correctly. Is it perhaps that Lagom is not mapping the configuration correctly?