From e1ff0378cbfdcb3a153a83153ff55f0a5e314d80 Mon Sep 17 00:00:00 2001 From: nroulon Date: Tue, 13 Jun 2023 16:56:44 +0200 Subject: [PATCH] fix merge --- .../main/kotlin/datamaintain/cli/app/App.kt | 2 +- modules/test/build.gradle.kts | 2 ++ .../test/kotlin/datamaintain/test/MongoIT.kt | 22 ++++++++----------- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/modules/cli/src/main/kotlin/datamaintain/cli/app/App.kt b/modules/cli/src/main/kotlin/datamaintain/cli/app/App.kt index 6e0b7349..8b379911 100644 --- a/modules/cli/src/main/kotlin/datamaintain/cli/app/App.kt +++ b/modules/cli/src/main/kotlin/datamaintain/cli/app/App.kt @@ -76,7 +76,7 @@ class App : CliktCommand() { ).flag() private val trace: Boolean? by detailedOption("-vv", - help = "trace is more verbose than verbose", + help = "verbose with more details", defaultValue = CliSpecificKey.VERBOSE.default ).flag() diff --git a/modules/test/build.gradle.kts b/modules/test/build.gradle.kts index d1e0a3ae..f3803a3c 100644 --- a/modules/test/build.gradle.kts +++ b/modules/test/build.gradle.kts @@ -9,4 +9,6 @@ dependencies { implementation(project(":modules:core")) implementation(project(":modules:driver-mongo")) implementation("org.mongodb:mongodb-driver-sync:${Versions.mongoDriver}") + + testImplementation("com.github.ajalt:clikt:${Versions.clikt}") } diff --git a/modules/test/src/test/kotlin/datamaintain/test/MongoIT.kt b/modules/test/src/test/kotlin/datamaintain/test/MongoIT.kt index ebe516ce..0a1dafd1 100644 --- a/modules/test/src/test/kotlin/datamaintain/test/MongoIT.kt +++ b/modules/test/src/test/kotlin/datamaintain/test/MongoIT.kt @@ -1,5 +1,6 @@ package datamaintain.test +import datamaintain.cli.app.datamaintainApp import datamaintain.cli.app.main import org.junit.jupiter.api.Test import strikt.api.expectThat @@ -23,10 +24,9 @@ class MongoIT : AbstractMongoDbTest() { arrayOf( "--db-type", "mongo", "--db-uri", mongoUri(), + "--verbose", ), arrayOf( - "--verbose", - "update-db", "--path", "src/test/resources/integration/ok", "--identifier-regex", "(.*?)_.*", "--print-db-output", @@ -53,10 +53,9 @@ class MongoIT : AbstractMongoDbTest() { arrayOf( "--db-type", "mongo", "--db-uri", mongoUri(), + "--verbose", ), arrayOf( - "--verbose", - "update-db", "--path", "src/test/resources/integration/partial", "--identifier-regex", "(.*?)_.*" ) @@ -70,9 +69,9 @@ class MongoIT : AbstractMongoDbTest() { arrayOf( "--db-type", "mongo", "--db-uri", mongoUri(), + "--verbose", ), arrayOf( - "--verbose", "--path", "src/test/resources/integration/ok", "--identifier-regex", "(.*?)_.*" ) @@ -118,10 +117,9 @@ class MongoIT : AbstractMongoDbTest() { arrayOf( "--db-type", "mongo", "--db-uri", mongoUri(), + "--verbose", ), arrayOf( - "--verbose", - "update-db", "--path", "src/test/resources/integration/ok", "--identifier-regex", "(.*?)_.*", "--execution-mode", "NORMAL", @@ -148,10 +146,9 @@ class MongoIT : AbstractMongoDbTest() { arrayOf( "--db-type", "mongo", "--db-uri", mongoUri(), + "--verbose", ), arrayOf( - "--verbose", - "update-db", "--path", "src/test/resources/integration/partial", "--identifier-regex", "(.*?)_.*" ) @@ -164,10 +161,10 @@ class MongoIT : AbstractMongoDbTest() { executeUpdateDbWithMongoClientInDocker( arrayOf( "--db-type", "mongo", - "--db-uri", mongoUri() + "--db-uri", mongoUri(), + "--verbose", ), arrayOf( - "--verbose", "--path", "src/test/resources/integration/override", "--identifier-regex", "(.*?)_.*", "--execution-mode", "NORMAL", @@ -194,7 +191,6 @@ class MongoIT : AbstractMongoDbTest() { "--verbose", "update-db", "--mongo-client", mongoCliDockerPath.toString(), - "--verbose", "--path", "src/test/resources/integration/ko", "--identifier-regex", "(.*?)_.*" ) @@ -227,7 +223,7 @@ class MongoIT : AbstractMongoDbTest() { arrayOf("--db-uri", mongoUri, "update-db", "--mongo-client", mongoCliDockerPath.toString()) + updateArgs - main(args) + datamaintainApp.parse(args) } private fun listExecutedFiles(): List {