In local development I want to connect to my personal database for auto-test. In the build farm, I want to connect to a different database for auto-test. How can that be done?
Play seems very flexible with configuration, except with running auto-tests. Have I missed a secret special trick somewhere?
See this thread…
Test and auto-test always uses test as ID, so you can’t overwrite the value depending on which test environment you are on. I am not aware if this bug has been fixed, but I couldnt find an associated bug or fix on lighthouse.
You can use environment variables in your
application.conf, see here, which means you can pass in the db name using a-Dvariable. Soplay auto-test -Dtestdb=your-cit-dbthen in you application.conf, you would do
%test.db.name={testdb}