I need to run test for my Play app in Codeship. The problem is that my app cannot find the database to connect to, and this all tests are failing. From the doc, I suppose that there are 3 different Postgres DBs (9.2, 9.3, 9.4) that I can use, so I configure my conf as below.
Please let me know where I got it wrong.
I finally found out why my test could not find the database. It was because running the test with
sbt test -Dconfig.resource=test.application.conf
is not a valid way to specify java option for test.I have to go to the
build.sbt
file and add the following for test to load the correct config like illustrated below.