From de44905edd8cea68aa7e6612609c7dbd8b1bbc1c Mon Sep 17 00:00:00 2001 From: Artem Kobzar Date: Fri, 12 Jan 2024 15:37:20 +0000 Subject: [PATCH] [Tests] Show all the missing artifacts in the ArtifactsTest instead of asserting one by one --- .../org/jetbrains/kotlin/code/ArtifactsTest.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/repo/artifacts-tests/src/test/kotlin/org/jetbrains/kotlin/code/ArtifactsTest.kt b/repo/artifacts-tests/src/test/kotlin/org/jetbrains/kotlin/code/ArtifactsTest.kt index bc289a8549c..c7ca9888324 100644 --- a/repo/artifacts-tests/src/test/kotlin/org/jetbrains/kotlin/code/ArtifactsTest.kt +++ b/repo/artifacts-tests/src/test/kotlin/org/jetbrains/kotlin/code/ArtifactsTest.kt @@ -59,15 +59,17 @@ class ArtifactsTest { }.asStream() } - @Test - fun allExpectedPomsPresentInActual() { + @TestFactory + fun allExpectedPomsPresentInActual(): Stream { val publishedPoms = findActualPoms() .map { it.toExpectedPath() } .filter { "${it.parent.fileName}" !in excludedProjects }.toSet() - findExpectedPoms().forEach { expected -> - assertTrue(expected in publishedPoms, "Missing actual pom for expected pom: $expected") - } + return findExpectedPoms().map { expected -> + DynamicTest.dynamicTest(expected.fileName.toString()) { + assertTrue(expected in publishedPoms, "Missing actual pom for expected pom: $expected") + } + }.asStream() } private fun findActualPoms() = Files.find(