Skip to content

Commit

Permalink
Merge pull request #84 from ekino/up/dependencies
Browse files Browse the repository at this point in the history
upgrade dependencies
  • Loading branch information
celcius112 authored Sep 3, 2024
2 parents ab5a546 + f84e9ca commit c9a8a08
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
--health-retries 10
mssql:
image: mcr.microsoft.com/mssql/server:2017-latest
image: mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04
env:
ACCEPT_EULA: Y
MSSQL_PID: Express
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
--health-retries 10
mssql:
image: mcr.microsoft.com/mssql/server:2017-latest
image: mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04
env:
ACCEPT_EULA: Y
MSSQL_PID: Express
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
--health-retries 10
mssql:
image: mcr.microsoft.com/mssql/server:2017-latest
image: mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04
env:
ACCEPT_EULA: Y
MSSQL_PID: Express
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Some tests require that the database container is running. To start the containe
````bash
docker compose up -d
````
Note: Currently, the MSSQL Docker image (`mcr.microsoft.com/mssql/server`) is not supported for the ARM64 platform. However, you can work around this limitation using the method described in this post: [https://github.com/microsoft/mssql-docker/issues/668#issuecomment-1436802153](https://github.com/microsoft/mssql-docker/issues/668#issuecomment-1436802153)

## Quick Start

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.8'

services:
mssql:
image: mcr.microsoft.com/mssql/server:2017-latest
image: mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04
command: /bin/bash ./entrypoint.sh
ports:
- '1433:1433'
Expand Down
40 changes: 18 additions & 22 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
[versions]

jcv-core = "1.5.0"
jsonassert = "1.5.0"
postgres = "42.5.0"
jsonassert = "1.5.3"
postgres = "42.7.4"
mssql = "11.2.0.jre11"
mysql = "8.0.29"
junit = "5.9.0"
assertj-core = "3.24.2"
mysql = "8.4.0"
junit = "5.11.0"
assertj-core = "3.26.3"
assertj-db = "2.0.2"
kotlin-jvm = "1.8.10"
dokka = "1.7.10"
kotlin-jvm = "1.9.25"
dokka = "1.9.20"
researchgate-release = "3.0.2"
kotlin-quality = "4.2.0"
java-driver-core = "4.15.0"
java-driver-query-builder = "4.17.0"
jackson-databind = "2.15.3"
jts-core = "1.19.0"
assertk-jvm = "0.25"
spring-jdbc = "5.3.23"
mongodb-driver = "4.9.0"

cassandra-driver = "4.18.1"
jackson-databind = "2.17.2"
jts-core = "1.20.0"
assertk-jvm = "0.28.1"
mongodb-driver = "4.11.3"

[libraries]

Expand All @@ -29,20 +26,19 @@ jcv-core = { module = "com.ekino.oss.jcv:jcv-core", version.ref = "jcv-core" }
jsonassert = { module = "org.skyscreamer:jsonassert", version.ref= "jsonassert" }
assertj-core = { module = "org.assertj:assertj-core", version.ref = "assertj-core" }
assertj-db = { module = "org.assertj:assertj-db", version.ref = "assertj-db" }
assertk-jvm = { module = "com.willowtreeapps.assertk:assertk-jvm", version.ref = "assertk-jvm" }
junit = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" }
postgres = { module = "org.postgresql:postgresql", version.ref = "postgres" }
mssql-jdbc = { module = "com.microsoft.sqlserver:mssql-jdbc", version.ref = "mssql" }
mysql-connector-java = { module = "mysql:mysql-connector-java", version.ref = "mysql" }
junit = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" }
java-driver-core = { module = "com.datastax.oss:java-driver-core", version.ref = "java-driver-core" }
java-driver-query-builder = { module = "com.datastax.oss:java-driver-query-builder", version.ref = "java-driver-query-builder" }
mysql-connector-java = { module = "com.mysql:mysql-connector-j", version.ref = "mysql" }
cassandra-driver-core = { module = "org.apache.cassandra:java-driver-core", version.ref = "cassandra-driver" }
cassandra-query-builder = { module = "org.apache.cassandra:java-driver-query-builder", version.ref = "cassandra-driver" }
jackson-databind = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "jackson-databind" }
jts-core = { module = "org.locationtech.jts:jts-core", version.ref = "jts-core" }
assertk-jvm = { module = "com.willowtreeapps.assertk:assertk-jvm", version.ref = "assertk-jvm" }
spring-jdbc = { module = "org.springframework:spring-jdbc", version.ref = "spring-jdbc" }
mongodb-driver = { module = "org.mongodb:mongodb-driver-sync", version.ref = "mongodb-driver" }

[bundles]

cassandra-driver = ["cassandra-driver-core", "cassandra-query-builder"]

[plugins]

Expand Down
3 changes: 1 addition & 2 deletions jcv-db-cassandra/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ dependencies {
implementation(libs.kotlin.stdlib)
implementation(libs.jcv.core)
implementation(libs.jsonassert)
implementation(libs.java.driver.core)
implementation(libs.java.driver.query.builder)
implementation(libs.bundles.cassandra.driver)

testImplementation(libs.junit)
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.ekino.oss.jcv.db

import assertk.assertThat
import assertk.assertFailure
import assertk.assertions.hasMessage
import assertk.assertions.isFailure
import com.ekino.oss.jcv.db.model.RowModel
import com.ekino.oss.jcv.db.model.TableModel
import org.json.JSONArray
Expand Down Expand Up @@ -102,16 +101,18 @@ class DbComparatorAssertTest {
)
)

assertThat {
assertFailure {
DbComparatorAssert.assertThatTableModel(tableModel).isValidAgainst(expected)
}.isFailure().hasMessage(
"""[content_test=abcd]
Expected: a JSON object
but none found
; [content_test=abcde]
Unexpected: a JSON object
Actual: [{"content_test":"abcde"}]"""
}.hasMessage(
"""
[content_test=abcd]
Expected: a JSON object
but none found
; [content_test=abcde]
Unexpected: a JSON object
Actual: [{"content_test":"abcde"}]
""".trimIndent()
)
}
}
31 changes: 18 additions & 13 deletions jcv-db-core/src/test/kotlin/com/ekino/oss/jcv/db/ValidatorsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,27 @@ class ValidatorsTest {

@Test
fun `json object validator`() {
assertThat {
compare(
"""{"field_name": {}}""",
"""{"field_name": "{#json_object#}"}"""
)
}.isSuccess()
assertThat(
runCatching {
compare(
"""{"field_name": {}}""",
"""{"field_name": "{#json_object#}"}"""
)
}
).isSuccess()
}

@Test
fun `json array validator`() {
assertThat {
compare(
"""{"field_name": []}""",
"""{"field_name": "{#json_array#}"}"""
)
}.isSuccess()
assertThat(
runCatching {
compare(
"""{"field_name": []}""",
"""{"field_name": "{#json_array#}"}"""
)
}
)
.isSuccess()
}

@Test
Expand Down Expand Up @@ -71,7 +76,7 @@ class ValidatorsTest {
}
}

private fun compare(actualJson: String, expectedJson: String, body: (JSONCompareResult) -> Unit = {}) = body.invoke(
private fun compare(actualJson: String, expectedJson: String, body: (JSONCompareResult) -> Unit = {}) = body(
JSONCompare.compareJSON(
expectedJson,
actualJson,
Expand Down
2 changes: 0 additions & 2 deletions jcv-db-jdbc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ val javadocJar by tasks.registering(Jar::class) {
from(layout.buildDirectory.file("dokka"))
}


java {
withSourcesJar()
}
Expand Down Expand Up @@ -81,7 +80,6 @@ dependencies {
implementation(libs.postgres)
implementation(libs.mssql.jdbc)
implementation(libs.mysql.connector.java)
implementation(libs.spring.jdbc)
implementation(libs.jackson.databind)

testImplementation(libs.junit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ class ValidatorsTest {

@Test
fun `mongo id validator`() {
assertThat {
compare(
"""{"field_name": "5d8253faef748a2c0e53ebfd"}""",
"""{"field_name": "{#mongo_id#}"}"""
)
}.isSuccess()
assertThat(
runCatching {
compare(
"""{"field_name": "5d8253faef748a2c0e53ebfd"}""",
"""{"field_name": "{#mongo_id#}"}"""
)
}
).isSuccess()
}

@Test
Expand Down

0 comments on commit c9a8a08

Please sign in to comment.