Skip to content

Commit

Permalink
chore(deps): Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
reneleonhardt committed Aug 17, 2024
1 parent 49e474f commit 0d9881a
Show file tree
Hide file tree
Showing 15 changed files with 330 additions and 237 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [8, 11, 17]
java: [8, 11, 17, 21]
steps:
- name: Checkout project
uses: actions/checkout@v3
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -526,19 +526,19 @@ The provider configuration can be managed via properties in the
and `zonky.test.database.mssql.docker` groups as shown below.

```properties
zonky.test.database.postgres.docker.image=postgres:11-alpine # Docker image containing PostgreSQL database.
zonky.test.database.postgres.docker.image=postgres:16-alpine # Docker image containing PostgreSQL database.
zonky.test.database.postgres.docker.tmpfs.enabled=false # Whether to mount postgres data directory as tmpfs.
zonky.test.database.postgres.docker.tmpfs.options=rw,noexec,nosuid # Mount options used to configure the tmpfs filesystem.

zonky.test.database.mysql.docker.image=mysql:5.7 # Docker image containing MySQL database.
zonky.test.database.mysql.docker.image=mysql:9 # Docker image containing MySQL database (arm64 requires 8+).
zonky.test.database.mysql.docker.tmpfs.enabled=false # Whether to mount database data directory as tmpfs.
zonky.test.database.mysql.docker.tmpfs.options=rw,noexec,nosuid # Mount options used to configure the tmpfs filesystem.

zonky.test.database.mariadb.docker.image=mariadb:10.4 # Docker image containing MariaDB database.
zonky.test.database.mariadb.docker.image=mariadb:11.5 # Docker image containing MariaDB database.
zonky.test.database.mariadb.docker.tmpfs.enabled=false # Whether to mount database data directory as tmpfs.
zonky.test.database.mariadb.docker.tmpfs.options=rw,noexec,nosuid # Mount options used to configure the tmpfs filesystem.

zonky.test.database.mssql.docker.image=mcr.microsoft.com/mssql/server:2017-latest # Docker image containing MSSQL database.
zonky.test.database.mssql.docker.image=mcr.microsoft.com/mssql/server:2022-latest # Docker image containing MSSQL database.
```

Or, the provider configuration can also be customized with a bean implementing `PostgreSQLContainerCustomizer` interface.
Expand Down Expand Up @@ -722,7 +722,7 @@ public class YandexProviderIntegrationTest {
The provider configuration can be managed via properties in the `zonky.test.database.postgres.yandex-provider` group.

```properties
zonky.test.database.postgres.yandex-provider.postgres-version=11.10-1 # Version of EnterpriseDB PostgreSQL binaries (https://www.enterprisedb.com/download-postgresql-binaries).
zonky.test.database.postgres.yandex-provider.postgres-version=12.18-1 # Version of EnterpriseDB PostgreSQL binaries (https://www.enterprisedb.com/download-postgresql-binaries).
```

## Advanced Topics
Expand Down
65 changes: 35 additions & 30 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import java.util.regex.Matcher

plugins {
id 'net.researchgate.release' version '2.8.1'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'net.researchgate.release' version '3.0.2'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}

ext {
Expand Down Expand Up @@ -91,29 +91,34 @@ ext {
]
}

if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) {
testSuites.find { it.name == 'hsqldb' }.versions << [name: '2.7.1', 'hsqldb': '2.7.1']
}
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_1_9)) {
testSuites.find { it.name == 'derby' }.versions << [name: '10.15.2.0', 'derby': '10.15.2.0']
}
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) {
testSuites.find { it.name == 'hsqldb' }.versions << [name: '2.7.3', 'hsqldb': '2.7.3']
testSuites.find { it.name == 'h2' }.versions << [name: '2.2.232', 'h2': '2.3.232']
testSuites.find { it.name == 'otj-pg-embedded' }.versions << [name: '1.1.0', 'otj-pg-embedded': '1.1.0']
}
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
testSuites.find { it.name == 'derby' }.versions << [name: '10.16.1.1', 'derby': '10.16.1.1']

testSuites.find { it.name == 'flyway' }.versions += [
[name: '9.9.0', flyway: '9.9.0', 'flyway-test': '9.5.0', spring: '6.0.14', 'spring-boot': '3.0.13', 'zonky-postgres': 'default'],
[name: '9.16.3', flyway: '9.16.3', 'flyway-test': '9.5.0', spring: '6.0.18', 'spring-boot': '3.1.10', 'zonky-postgres': 'default'],
[name: '9.22.3', flyway: '9.22.3', 'flyway-test': '9.5.0', spring: '6.1.5', 'spring-boot': '3.2.4', 'zonky-postgres': 'default'],
[name: '10.0.1', flyway: '10.0.1', 'flyway-test': '10.0.0', spring: '6.1.5', 'spring-boot': '3.2.4', 'zonky-postgres': 'default'],
[name: '10.11.0', flyway: '10.5.0', 'flyway-test': '10.0.0', spring: '6.1.5', 'spring-boot': '3.2.4', 'zonky-postgres': 'default']
[name: '9.16.3', flyway: '9.16.3', 'flyway-test': '9.5.0', spring: '6.0.21', 'spring-boot': '3.1.12', 'zonky-postgres': 'default'],
[name: '9.22.3', flyway: '9.22.3', 'flyway-test': '9.5.0', spring: '6.1.11', 'spring-boot': '3.2.8', 'zonky-postgres': 'default'],
[name: '10.0.1', flyway: '10.0.1', 'flyway-test': '10.0.0', spring: '6.1.11', 'spring-boot': '3.2.8', 'zonky-postgres': 'default'],
[name: '10.17.1', flyway: '10.17.1', 'flyway-test': '10.0.0', spring: '6.1.11', 'spring-boot': '3.2.8', 'zonky-postgres': 'default']
]

testSuites.find { it.name == 'liquibase' }.versions += [
[name: '4.17.2', liquibase: '4.17.2', spring: '6.0.14', 'spring-boot': '3.0.13'],
[name: '4.20.0', liquibase: '4.20.0', spring: '6.0.18', 'spring-boot': '3.1.10'],
[name: '4.24.0', liquibase: '4.24.0', spring: '6.1.5', 'spring-boot': '3.2.4']
[name: '4.20.0', liquibase: '4.20.0', spring: '6.0.21', 'spring-boot': '3.1.12'],
[name: '4.24.0', liquibase: '4.24.0', spring: '6.1.11', 'spring-boot': '3.2.8']
]
}
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_21)) {
testSuites.find { it.name == 'derby' }.versions << [name: '10.17.1.0', 'derby': '10.17.1.0']
}

allprojects {
group 'io.zonky.test'
Expand Down Expand Up @@ -233,7 +238,7 @@ subprojects {
/(\d+)\.\d+(([^\d\.].*)?$)/: { Matcher m, Project p -> m.replaceAll("${(m[0][1] as int) + 1}.0${m[0][2]}") }
]
git {
requireBranch = '^(master|\\d+\\.\\d+\\.x)$'
requireBranch.set('^(master|\\d+\\.\\d+\\.x)$')
}
}
}
Expand All @@ -253,20 +258,20 @@ project(':embedded-database-spring-test') {
dependencies {
api project(':embedded-database-spring-test-autoconfigure')

api 'org.testcontainers:postgresql:1.18.3'
api 'org.testcontainers:mssqlserver:1.18.3'
api 'org.testcontainers:mysql:1.18.3'
api 'org.testcontainers:mariadb:1.18.3'
api 'org.testcontainers:postgresql:1.20.1'
api 'org.testcontainers:mssqlserver:1.20.1'
api 'org.testcontainers:mysql:1.20.1'
api 'org.testcontainers:mariadb:1.20.1'

optImplementation 'io.zonky.test:embedded-postgres:2.0.7'
optImplementation 'com.opentable.components:otj-pg-embedded:0.13.4'
optImplementation 'ru.yandex.qatools.embed:postgresql-embedded:2.10'

optImplementation 'org.postgresql:postgresql:42.7.3'
optImplementation 'com.microsoft.sqlserver:mssql-jdbc:11.2.0.jre8'
optImplementation 'mysql:mysql-connector-java:8.0.30'
optImplementation 'org.mariadb.jdbc:mariadb-java-client:3.1.0'
optImplementation 'com.h2database:h2:2.1.214'
optImplementation 'com.microsoft.sqlserver:mssql-jdbc:12.8.0.jre8'
optImplementation 'mysql:mysql-connector-java:8.0.33'
optImplementation 'org.mariadb.jdbc:mariadb-java-client:3.4.1'
optImplementation 'com.h2database:h2:2.2.224'
optImplementation 'org.hsqldb:hsqldb:2.5.2'
optImplementation 'org.apache.derby:derby:10.14.2.0'
optImplementation 'org.apache.derby:derbytools:10.14.2.0'
Expand All @@ -276,22 +281,22 @@ project(':embedded-database-spring-test') {
optImplementation('org.springframework.boot:spring-boot-starter-test:2.7.18') {
exclude group: 'org.mockito'
}
optImplementation 'org.liquibase:liquibase-core:3.5.5'
optImplementation 'org.liquibase:liquibase-core:3.10.3'

api 'org.springframework:spring-context:5.3.31'
api 'org.springframework:spring-test:5.3.31'

optImplementation 'com.google.guava:guava:24.1.1-jre'
optImplementation 'com.google.guava:guava:33.2.1-jre'

api('com.cedarsoftware:java-util:1.68.0') {
api('com.cedarsoftware:java-util:2.13.0') {
exclude group: 'org.apache.logging.log4j'
}

testImplementation 'org.springframework:spring-jdbc:5.3.31'
testImplementation 'ch.qos.logback:logback-classic:1.2.11'
testImplementation 'org.mockito:mockito-core:3.12.4'
testImplementation 'org.assertj:assertj-core:3.23.1'
testImplementation 'com.zaxxer:HikariCP:4.0.3'
testImplementation 'org.springframework:spring-jdbc:5.3.31' // 5.3 is Java 8
testImplementation 'ch.qos.logback:logback-classic:1.3.14' // 1.3 is Java 8
testImplementation 'org.mockito:mockito-core:3.12.4' // 4.11.0 is Java 8
testImplementation 'org.assertj:assertj-core:3.26.3'
testImplementation 'com.zaxxer:HikariCP:4.0.3' // 4.0 is Java 8
}

configurations {
Expand Down Expand Up @@ -327,7 +332,7 @@ project(':embedded-database-spring-test') {

eachDependency { details ->
if (details.requested.group == 'junit') {
details.useVersion "4.12"
details.useVersion "4.13.2"
}
}

Expand Down Expand Up @@ -579,7 +584,7 @@ task updateReadmeVersion() {
}

// workaround for https://github.com/researchgate/gradle-release/issues/186
task build(group: 'build') {
tasks.named('build') {
subprojects.each {
dependsOn "${it.path}:build"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public DatabasePool load(DatabaseConfig config) {
private final ClientConfig clientConfig;

public DockerMariaDBDatabaseProvider(Environment environment, ObjectProvider<List<MariaDBContainerCustomizer>> containerCustomizers) {
String dockerImage = environment.getProperty("zonky.test.database.mariadb.docker.image", "mariadb:10.4");
String dockerImage = environment.getProperty("zonky.test.database.mariadb.docker.image", "mariadb:10.11");
String tmpfsOptions = environment.getProperty("zonky.test.database.mariadb.docker.tmpfs.options", "rw,noexec,nosuid");
boolean tmpfsEnabled = environment.getProperty("zonky.test.database.mariadb.docker.tmpfs.enabled", boolean.class, false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public DatabasePool load(DatabaseConfig config) {
private final ClientConfig clientConfig;

public DockerMySQLDatabaseProvider(Environment environment, ObjectProvider<List<MySQLContainerCustomizer>> containerCustomizers) {
String dockerImage = environment.getProperty("zonky.test.database.mysql.docker.image", "mysql:5.7");
String dockerImage = environment.getProperty("zonky.test.database.mysql.docker.image", "mysql:8.4");
String tmpfsOptions = environment.getProperty("zonky.test.database.mysql.docker.tmpfs.options", "rw,noexec,nosuid");
boolean tmpfsEnabled = environment.getProperty("zonky.test.database.mysql.docker.tmpfs.enabled", boolean.class, false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public DatabaseInstance load(DatabaseConfig config) {
private final ClientConfig clientConfig;

public DockerPostgresDatabaseProvider(Environment environment, ObjectProvider<List<PostgreSQLContainerCustomizer>> containerCustomizers) {
String dockerImage = environment.getProperty("zonky.test.database.postgres.docker.image", "postgres:11-alpine");
String dockerImage = environment.getProperty("zonky.test.database.postgres.docker.image", "postgres:16-alpine");
String tmpfsOptions = environment.getProperty("zonky.test.database.postgres.docker.tmpfs.options", "rw,noexec,nosuid");
boolean tmpfsEnabled = environment.getProperty("zonky.test.database.postgres.docker.tmpfs.enabled", boolean.class, false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public DatabaseInstance load(DatabaseConfig config) throws IOException {
private final ClientConfig clientConfig;

public YandexPostgresDatabaseProvider(Environment environment) {
String postgresVersion = environment.getProperty("zonky.test.database.postgres.yandex-provider.postgres-version", "11.10-1");
String postgresVersion = environment.getProperty("zonky.test.database.postgres.yandex-provider.postgres-version", "11.21-1");

Map<String, String> initdbProperties = PropertyUtils.extractAll(environment, "zonky.test.database.postgres.initdb.properties");
Map<String, String> configProperties = PropertyUtils.extractAll(environment, "zonky.test.database.postgres.server.properties");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"name": "zonky.test.database.postgres.yandex-provider.postgres-version",
"type": "java.lang.String",
"description": "Version of EnterpriseDB PostgreSQL binaries (https://www.enterprisedb.com/download-postgresql-binaries).",
"defaultValue": "11.10-1"
"defaultValue": "11.21-1"
},
{
"name": "zonky.test.database.mssql.client.properties",
Expand Down Expand Up @@ -256,76 +256,64 @@
"name": "zonky.test.database.postgres.docker.image",
"values": [
{
"value": "postgres:13-alpine"
},
{
"value": "postgres:12-alpine"
},
{
"value": "postgres:11-alpine"
},
{
"value": "postgres:10-alpine"
},
{
"value": "postgres:9.6-alpine"
"value": "postgres:16-alpine"
},
{
"value": "postgres:9.5-alpine"
"value": "postgres:15-alpine"
},
{
"value": "postgres:13"
"value": "postgres:14-alpine"
},
{
"value": "postgres:12"
"value": "postgres:13-alpine"
},
{
"value": "postgres:11"
"value": "postgres:12-alpine"
},
{
"value": "postgres:10"
"value": "postgres:16"
},
{
"value": "postgres:9.6"
"value": "postgres:15"
},
{
"value": "postgres:9.5"
"value": "postgres:14"
},
{
"value": "postgis/postgis:13-3.1-alpine"
"value": "postgres:13"
},
{
"value": "postgis/postgis:12-3.1-alpine"
"value": "postgres:12"
},
{
"value": "postgis/postgis:11-3.1-alpine"
"value": "postgis/postgis:16-3.4-alpine"
},
{
"value": "postgis/postgis:10-3.1-alpine"
"value": "postgis/postgis:15-3.4-alpine"
},
{
"value": "postgis/postgis:9.6-3.1-alpine"
"value": "postgis/postgis:14-3.4-alpine"
},
{
"value": "postgis/postgis:9.5-3.0-alpine"
"value": "postgis/postgis:13-3.4-alpine"
},
{
"value": "postgis/postgis:13-3.1"
"value": "postgis/postgis:12-3.4-alpine"
},
{
"value": "postgis/postgis:12-3.1"
"value": "postgis/postgis:16-3.4"
},
{
"value": "postgis/postgis:11-3.1"
"value": "postgis/postgis:15-3.4"
},
{
"value": "postgis/postgis:10-3.1"
"value": "postgis/postgis:14-3.4"
},
{
"value": "postgis/postgis:9.6-3.1"
"value": "postgis/postgis:13-3.4"
},
{
"value": "postgis/postgis:9.5-3.0"
"value": "postgis/postgis:12-3.4"
}
],
"providers": [
Expand Down Expand Up @@ -357,13 +345,16 @@
"name": "zonky.test.database.mysql.docker.image",
"values": [
{
"value": "mysql:8.0"
"value": "mysql:9.0"
},
{
"value": "mysql:5.7"
"value": "mysql:8.4"
},
{
"value": "mysql:8.0"
},
{
"value": "mysql:5.6"
"value": "mysql:5.7"
}
],
"providers": [
Expand All @@ -376,19 +367,25 @@
"name": "zonky.test.database.mariadb.docker.image",
"values": [
{
"value": "mariadb:10.5"
"value": "mariadb:11.5"
},
{
"value": "mariadb:11.4"
},
{
"value": "mariadb:10.4"
"value": "mariadb:11.2"
},
{
"value": "mariadb:10.3"
"value": "mariadb:11.1"
},
{
"value": "mariadb:10.2"
"value": "mariadb:10.11"
},
{
"value": "mariadb:10.1"
"value": "mariadb:10.6"
},
{
"value": "mariadb:10.5"
}
],
"providers": [
Expand All @@ -398,4 +395,4 @@
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class SpringBootCustomDatabaseIntegrationTest {
public static ConditionalTestRule conditionalTestRule = new ConditionalTestRule(TestAssumptions::assumeSpringBootSupportsJdbcTestAnnotation);

@ClassRule
public static PostgreSQLContainer<?> postgresContainer = new PostgreSQLContainer<>("postgres:11-alpine");
public static PostgreSQLContainer<?> postgresContainer = new PostgreSQLContainer<>("postgres:16-alpine");

public static class DockerPropertiesInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> {

Expand Down
Loading

0 comments on commit 0d9881a

Please sign in to comment.