Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,9 @@ public void apply(Project project) {
task.into("META-INF", copy -> copy.from(testBuildInfoTask));
});

if (project.getRootProject().getName().equals("elasticsearch")) {
project.getTasks()
.withType(Test.class)
.matching(test -> List.of("test", "internalClusterTest").contains(test.getName()))
.configureEach(test -> {
test.systemProperty("es.entitlement.enableForTests", "true");
});
}
project.getTasks()
.withType(Test.class)
.matching(test -> List.of("test", "internalClusterTest").contains(test.getName()))
.configureEach(test -> test.getSystemProperties().putIfAbsent("es.entitlement.enableForTests", "true"));
}
}
5 changes: 5 additions & 0 deletions plugins/examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ subprojects {
targetCompatibility = 21
}

test {
// testing with entitlements doesn't work for example plugins ES-12453
systemProperty 'es.entitlement.enableForTests', 'false'
}

repositories {
// Only necessary when building plugins against SNAPSHOT versions of Elasticsearch
if (gradle.includedBuilds.isEmpty()) {
Expand Down