This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import nu.studer.gradle.jooq.JooqGenerate | |
| import org.flywaydb.core.Flyway | |
| import org.flywaydb.core.api.configuration.FluentConfiguration | |
| import org.jooq.meta.jaxb.Configuration | |
| import org.testcontainers.containers.JdbcDatabaseContainer | |
| import org.testcontainers.containers.PostgreSQLContainer | |
| import org.testcontainers.utility.DockerImageName | |
| plugins { | |
| id("nu.studer.jooq") version "7.1.1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class PostgresContainerExtension implements BeforeAllCallback { | |
| static private final PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>("postgres:13-alpine"); | |
| @Override | |
| public void beforeAll(ExtensionContext context) { | |
| postgres.start(); | |
| System.setProperty("spring.datasource.url", postgres.getJdbcUrl()); | |
| System.setProperty("spring.datasource.username", postgres.getUsername()); | |
| System.setProperty("spring.datasource.password", postgres.getPassword()); |