Skip to content

Commit 23d50bf

Browse files
Bump io.github.mfvanek:pg-index-health-bom from 0.20.2 to 0.20.3 (#374)
* Bump io.github.mfvanek:pg-index-health-bom from 0.20.2 to 0.20.3 Bumps [io.github.mfvanek:pg-index-health-bom](https://github.com/mfvanek/pg-index-health) from 0.20.2 to 0.20.3. - [Release notes](https://github.com/mfvanek/pg-index-health/releases) - [Commits](mfvanek/pg-index-health@v.0.20.2...v.0.20.3) --- updated-dependencies: - dependency-name: io.github.mfvanek:pg-index-health-bom dependency-version: 0.20.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Upgrade to pgih 0.30.0 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ivan Vakhrushev <mfvanek@gmail.com>
1 parent 51f6e27 commit 23d50bf

File tree

6 files changed

+19
-11
lines changed

6 files changed

+19
-11
lines changed

console-app-example/src/main/java/io/github/mfvanek/postgres/example/PostgresClusterDemo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static void main(String[] args) throws InterruptedException {
2121
.withUsername("test_user")
2222
.withPassword("test_password")
2323
.withDatabaseName("test_db")
24-
.withPostgresVersion("17.4")
24+
.withPostgresVersion("17.6.0")
2525
.build()) {
2626
final var pgUrl = clusterWrapper.getCommonUrlToPrimary();
2727
log.info("pgUrl = {}", pgUrl);

console-app-example/src/test/java/io/github/mfvanek/postgres/example/SimpleTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class SimpleTest {
2222
@Test
2323
void testSimple() throws SQLException {
2424
try (PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>(
25-
DockerImageName.parse("postgres").withTag("17.4"))
25+
DockerImageName.parse("postgres").withTag("17.6"))
2626
.withTmpFs(Collections.singletonMap("/var/lib/postgresql/data", "rw"))
2727
.withDatabaseName("test_db")
2828
.withUsername("test_user")

db-commons/src/test/java/io/github/mfvanek/postgres/hikari/HikariDataSourceProviderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class HikariDataSourceProviderTest {
1717
@Test
1818
void getDataSourceShouldSetDriverClassName() {
1919
try (PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>(
20-
DockerImageName.parse("postgres").withTag("17.4"))
20+
DockerImageName.parse("postgres").withTag("17.6"))
2121
.withTmpFs(Collections.singletonMap("/var/lib/postgresql/data", "rw"))
2222
.withDatabaseName("test_db")
2323
.withUsername("test_user")

internal-bom/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ javaPlatform {
1212
dependencies {
1313
api(platform("org.junit:junit-bom:5.13.4"))
1414
api(platform("org.testcontainers:testcontainers-bom:1.21.3"))
15-
api(platform("io.github.mfvanek:pg-index-health-bom:0.20.2"))
15+
api(platform("io.github.mfvanek:pg-index-health-bom:0.30.0"))
1616
api(platform("org.mockito:mockito-bom:5.20.0"))
1717
api(platform("org.assertj:assertj-bom:3.27.6"))
1818

spring-boot-app-example/src/main/java/io/github/mfvanek/pg/cluster/config/DatabaseConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public PostgreSqlClusterWrapper clusterWrapper() {
2424
.withUsername("test_user")
2525
.withPassword("test_password")
2626
.withDatabaseName("test_database")
27-
.withPostgresVersion("17.4")
27+
.withPostgresVersion("17.6.0")
2828
.build();
2929
}
3030

spring-boot-app-example/src/test/java/io/github/mfvanek/pg/cluster/DatabaseStructureStaticAnalysisTest.java

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import io.github.mfvanek.pg.core.checks.common.DatabaseCheckOnHost;
44
import io.github.mfvanek.pg.core.checks.common.Diagnostic;
5+
import io.github.mfvanek.pg.model.column.Column;
6+
import io.github.mfvanek.pg.model.column.ColumnWithType;
57
import io.github.mfvanek.pg.model.dbobject.DbObject;
68
import io.github.mfvanek.pg.model.table.Table;
79
import io.github.mfvanek.pg.testing.PostgreSqlClusterWrapper;
@@ -47,7 +49,7 @@ class DatabaseStructureStaticAnalysisTest {
4749
void checkPostgresVersion() {
4850
final String pgVersion = jdbcTemplate.queryForObject("select version();", String.class);
4951
assertThat(pgVersion)
50-
.startsWith("PostgreSQL 17.4");
52+
.startsWith("PostgreSQL 17.6");
5153
}
5254

5355
@Test
@@ -59,14 +61,20 @@ void databaseStructureCheckForPublicSchema() {
5961
.filter(DatabaseCheckOnHost::isStatic)
6062
.forEach(check -> {
6163
final ListAssert<? extends DbObject> checkAssert = assertThat(check.check())
62-
.as(check.getDiagnostic().name());
64+
.as(check.getName());
6365

64-
switch (check.getDiagnostic()) {
65-
case COLUMNS_WITH_FIXED_LENGTH_VARCHAR -> checkAssert.hasSize(2);
66-
case COLUMNS_WITHOUT_DESCRIPTION -> checkAssert.hasSize(4);
67-
case TABLES_NOT_LINKED_TO_OTHERS -> checkAssert.hasSize(1)
66+
switch (check.getName()) {
67+
case "COLUMNS_WITH_FIXED_LENGTH_VARCHAR" -> checkAssert.hasSize(2);
68+
case "COLUMNS_WITHOUT_DESCRIPTION" -> checkAssert.hasSize(4);
69+
case "TABLES_NOT_LINKED_TO_OTHERS", "TABLES_WHERE_PRIMARY_KEY_COLUMNS_NOT_FIRST" -> checkAssert.hasSize(1)
6870
.asInstanceOf(list(Table.class))
6971
.containsExactly(Table.of("employees"));
72+
case "COLUMNS_WITH_TIMESTAMP_OR_TIMETZ_TYPE" -> checkAssert.hasSize(2)
73+
.asInstanceOf(list(ColumnWithType.class))
74+
.containsExactly(
75+
ColumnWithType.ofTimestamp(Column.ofNotNull("employees", "created_at")),
76+
ColumnWithType.ofTimestamp(Column.ofNullable("employees", "updated_at"))
77+
);
7078
default -> checkAssert.isEmpty();
7179
}
7280
});

0 commit comments

Comments
 (0)