Search code examples
postgresqlherokuclojuretravis-ciring

How can I test a heroku database on travis securely?


I'm using Ring(Clojure) on Heroku and I'm implementing some tests in the app. Some of the tests are GET requests to the app, and the app has a PostgreSQL database that fills some pages. But, to do so, the app has to connect to the original Heroku database.

How can I test if some content is present in a GET request without putting the database connection specs (url, user, password) in the .travis.yml file? Am I even supposed to do that? Or should I just setup a test database, fill it with test data and test the contents, with a localhost connection?

Thanks.


Solution

  • I think you could put the credential in a Travis Encryption key. The only problem is that Pull Requests cannot use the decrypted keys (for security purposes).