aboutsummaryrefslogtreecommitdiff
path: root/integration-tests/cli/src/integrationTest/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'integration-tests/cli/src/integrationTest/kotlin')
-rw-r--r--integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/CliIntegrationTest.kt24
1 files changed, 24 insertions, 0 deletions
diff --git a/integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/CliIntegrationTest.kt b/integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/CliIntegrationTest.kt
index 05ef667a..8935f8f5 100644
--- a/integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/CliIntegrationTest.kt
+++ b/integration-tests/cli/src/integrationTest/kotlin/org/jetbrains/dokka/it/cli/CliIntegrationTest.kt
@@ -155,6 +155,7 @@ class CliIntegrationTest : AbstractCliIntegrationTest() {
val process = ProcessBuilder(
"java", "-jar", cliJarFile.path,
"-outputDir", dokkaOutputDir.path,
+ "-loggingLevel", "DEBUG",
"-pluginsClasspath", basePluginJarFile.path,
"-sourceSet",
buildString {
@@ -166,6 +167,7 @@ class CliIntegrationTest : AbstractCliIntegrationTest() {
val result = process.awaitProcessResult()
assertEquals(0, result.exitCode, "Expected exitCode 0 (Success)")
+ assertTrue(result.output.contains("Loaded plugins: "), "Expected output to not contain info logs")
assertTrue(dokkaOutputDir.isDirectory, "Missing dokka output directory")
@@ -181,4 +183,26 @@ class CliIntegrationTest : AbstractCliIntegrationTest() {
val navigationHtml = File(dokkaOutputDir, "navigation.html")
assertTrue(navigationHtml.isFile, "Missing navigation.html")
}
+
+ @Test
+ fun `logging level should be respected`(){
+ val dokkaOutputDir = File(projectDir, "output")
+ assertTrue(dokkaOutputDir.mkdirs())
+ val process = ProcessBuilder(
+ "java", "-jar", cliJarFile.path,
+ "-outputDir", dokkaOutputDir.path,
+ "-loggingLevel", "WARN",
+ "-pluginsClasspath", basePluginJarFile.path,
+ "-sourceSet",
+ buildString {
+ append(" -src ${File(projectDir, "src").path}")
+ }
+ )
+ .redirectErrorStream(true)
+ .start()
+
+ val result = process.awaitProcessResult()
+ assertEquals(0, result.exitCode, "Expected exitCode 0 (Success)")
+ assertFalse(result.output.contains("Loaded plugins: "), "Expected output to not contain info logs")
+ }
}