From 135345d678a42dd4895afeeb2809b6d0b520ded8 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Mon, 27 Sep 2021 20:00:31 +0300 Subject: [PATCH] get rid test directory (via #71) --- .../io/qameta/allure/gradle/adapter/AllureAdapterExtension.kt | 2 +- .../java/io/qameta/allure/gradle/allure/DependenciesTest.java | 2 +- .../java/io/qameta/allure/gradle/allure/TestNgSpiOffTest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/allure-adapter-plugin/src/main/kotlin/io/qameta/allure/gradle/adapter/AllureAdapterExtension.kt b/allure-adapter-plugin/src/main/kotlin/io/qameta/allure/gradle/adapter/AllureAdapterExtension.kt index b42ce75..9591321 100644 --- a/allure-adapter-plugin/src/main/kotlin/io/qameta/allure/gradle/adapter/AllureAdapterExtension.kt +++ b/allure-adapter-plugin/src/main/kotlin/io/qameta/allure/gradle/adapter/AllureAdapterExtension.kt @@ -121,7 +121,7 @@ open class AllureAdapterExtension @Inject constructor( task.run { // Each task should store results in its own folder // End user should not depend on the folder name, so we do not expose it - val rawResults = project.layout.buildDirectory.dir("allure-results/${task.name}").get().asFile + val rawResults = project.layout.buildDirectory.dir("allure-results").get().asFile // See https://github.com/allure-framework/allure2/issues/1236 // We exclude categories.json since report task would copy categories right to the folder // of the current task diff --git a/allure-plugin/src/test/java/io/qameta/allure/gradle/allure/DependenciesTest.java b/allure-plugin/src/test/java/io/qameta/allure/gradle/allure/DependenciesTest.java index fd45169..416bb4e 100644 --- a/allure-plugin/src/test/java/io/qameta/allure/gradle/allure/DependenciesTest.java +++ b/allure-plugin/src/test/java/io/qameta/allure/gradle/allure/DependenciesTest.java @@ -67,7 +67,7 @@ public void shouldCreateAllureResults() { .extracting("outcome") .containsExactly(SUCCESS); - File resultsDir = new File(gradleRunner.getProjectDir(), "build/allure-results/test"); + File resultsDir = new File(gradleRunner.getProjectDir(), "build/allure-results"); assertThat(resultsDir).as("Allure results directory") .exists(); diff --git a/allure-plugin/src/test/java/io/qameta/allure/gradle/allure/TestNgSpiOffTest.java b/allure-plugin/src/test/java/io/qameta/allure/gradle/allure/TestNgSpiOffTest.java index 0f625e3..a354abb 100644 --- a/allure-plugin/src/test/java/io/qameta/allure/gradle/allure/TestNgSpiOffTest.java +++ b/allure-plugin/src/test/java/io/qameta/allure/gradle/allure/TestNgSpiOffTest.java @@ -45,7 +45,7 @@ public void allureReportIsNotGenerated() { .filteredOn(task -> task.getPath().equals(":test") || task.getPath().equals(":allureReport")) .extracting("outcome") .containsExactly(SUCCESS); - File resultsDir = new File(projectDir.getAbsolutePath() + "/build/allure-results/test"); + File resultsDir = new File(projectDir.getAbsolutePath() + "/build/allure-results"); // executor.json is always generated assertThat(resultsDir.listFiles()) .filteredOn(file -> !file.getName().equals("executor.json"))