From 60e47e8a2d3e7cece831977d92679177da737259 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Thu, 4 Jul 2024 14:11:44 +0200 Subject: [PATCH] Tests fixes --- .../changelog/tasks/InitializeChangelogTaskTest.kt | 1 + .../changelog/tasks/PatchChangelogTaskTest.kt | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/test/kotlin/org/jetbrains/changelog/tasks/InitializeChangelogTaskTest.kt b/src/test/kotlin/org/jetbrains/changelog/tasks/InitializeChangelogTaskTest.kt index 40a6c2e..1eba7fc 100644 --- a/src/test/kotlin/org/jetbrains/changelog/tasks/InitializeChangelogTaskTest.kt +++ b/src/test/kotlin/org/jetbrains/changelog/tasks/InitializeChangelogTaskTest.kt @@ -178,6 +178,7 @@ class InitializeChangelogTaskTest : BaseTest() { @Test fun `task loads from the configuration cache`() { + runTask(INITIALIZE_CHANGELOG_TASK_NAME) runTask(INITIALIZE_CHANGELOG_TASK_NAME) val result = runTask(INITIALIZE_CHANGELOG_TASK_NAME) diff --git a/src/test/kotlin/org/jetbrains/changelog/tasks/PatchChangelogTaskTest.kt b/src/test/kotlin/org/jetbrains/changelog/tasks/PatchChangelogTaskTest.kt index caee78f..36b2936 100644 --- a/src/test/kotlin/org/jetbrains/changelog/tasks/PatchChangelogTaskTest.kt +++ b/src/test/kotlin/org/jetbrains/changelog/tasks/PatchChangelogTaskTest.kt @@ -577,7 +577,12 @@ class PatchChangelogTaskTest : BaseTest() { [world]: https://jetbrains.com """.trimIndent(), - extension.render() + extension.render().also { + println("--------") + println(it) + println("--------") + } + ) assertMarkdown( @@ -1307,7 +1312,7 @@ class PatchChangelogTaskTest : BaseTest() { project.evaluate() runTask(PATCH_CHANGELOG_TASK_NAME) - val result = runTask(PATCH_CHANGELOG_TASK_NAME) + runTask(PATCH_CHANGELOG_TASK_NAME) assertMarkdown( """ @@ -1344,12 +1349,13 @@ class PatchChangelogTaskTest : BaseTest() { """.trimIndent(), extension.render() ) - + val result = runTask(PATCH_CHANGELOG_TASK_NAME) assertTrue(result.output.contains("Reusing configuration cache.")) } @Test fun `task loads from the configuration cache`() { + runTask(PATCH_CHANGELOG_TASK_NAME) runTask(PATCH_CHANGELOG_TASK_NAME) val result = runTask(PATCH_CHANGELOG_TASK_NAME)