From 72de108b9780259e4f1b7befa664c0ce1b9a5124 Mon Sep 17 00:00:00 2001 From: Rene Groeschke Date: Mon, 11 Sep 2023 19:25:42 +0200 Subject: [PATCH] Fix check for restricting invoking ecs tests directly (#99435) --- x-pack/plugin/stack/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugin/stack/build.gradle b/x-pack/plugin/stack/build.gradle index 7e19f988eacc6..6b26373c40544 100644 --- a/x-pack/plugin/stack/build.gradle +++ b/x-pack/plugin/stack/build.gradle @@ -23,10 +23,10 @@ dependencies { } // These tests are only invoked direclty as part of a dedicated build job -tasks.named('javaRestTest').configure { +tasks.named('javaRestTest').configure {task -> onlyIf("E2E test task must be invoked directly") { - gradle.startParameter.getTaskNames().contains(this.path) || - (gradle.startParameter.getTaskNames().contains(this.name) && gradle.startParameter.currentDir == project.projectDir) + gradle.startParameter.getTaskNames().contains(task.path) || + (gradle.startParameter.getTaskNames().contains(task.name) && gradle.startParameter.currentDir == project.projectDir) } }