diff --git a/build.gradle.kts b/build.gradle.kts index a49c495..02bcdba 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -191,10 +191,16 @@ tasks.test { useJUnitPlatform() systemProperty("junit.jupiter.execution.parallel.enabled", true) dependsOn(testSql) - finalizedBy(tasks.ktlintCheck) finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run } +tasks.register("testAll") { + group = "verification" + dependsOn(testSql) + dependsOn(tasks.test) + dependsOn(tasks.ktlintCheck) +} + apply(plugin = "docker-compose") dockerCompose { projectName = "dc-project" diff --git a/src/main/kotlin/fr/dcproject/component/article/ArticleViewManager.kt b/src/main/kotlin/fr/dcproject/component/article/ArticleViewManager.kt index 7150216..757a47a 100644 --- a/src/main/kotlin/fr/dcproject/component/article/ArticleViewManager.kt +++ b/src/main/kotlin/fr/dcproject/component/article/ArticleViewManager.kt @@ -59,33 +59,33 @@ class ArticleViewManager (private val restClient: RestClient) : ViewManager< //language=JSON setJsonEntity( """ - { - "size": 0, - "query": { - "bool": { - "must": { - "term": { - "version_id": "${entity.versionId}" + { + "size": 0, + "query": { + "bool": { + "must": { + "term": { + "version_id": "${entity.versionId}" + } + } + } + }, + "aggs" : { + "total": { + "composite" : { + "sources" : [ + { "version_id": { "terms": {"field": "version_id" } } } + ] + } + }, + "unique" : { + "cardinality" : { + "field" : "user_ref", + "precision_threshold": 1 + } } } } - }, - "aggs" : { - "total": { - "composite" : { - "sources" : [ - { "version_id": { "terms": {"field": "version_id" } } } - ] - } - }, - "unique" : { - "cardinality" : { - "field" : "user_ref", - "precision_threshold": 1 - } - } - } - } """.trimIndent() ) }