Setting Up Integration Tests
Learn how to set up integration tests by making a configuration file and implementing a base class.
Configuration file for integration tests
First, we need to configure our test database because we do not want to accidentally wipe out our production database. For our case, we leave everything as is and change the database name.
Press + to interact
api {host = "localhost"port = 49152}database {profile = "slick.jdbc.PostgresProfile$"db {connectionPool = "HikariCP"dataSourceClass = "org.postgresql.ds.PGSimpleDataSource"properties {serverName = "localhost"portNumber = "5432"databaseName = "impure_test"user = "impure"password = "secret"}numThreads = 10}}
Logging configuration for integration tests
Another thing we should do is provide a test configuration for our logging framework. We use the logback library. ...