Skip to content

Commit

Permalink
Ensure only plugin REST tests are run for plugins
Browse files Browse the repository at this point in the history
This commit fixes ensures that for external builds
(e.g. plugin development) that the REST tests that are
copied are properly filtered to only include the API
by default.

The code prior to this change resulted in including both
the API and tests since the copy.include resulted as an
empty list by default since the stream is empty unless
explictly configured.

related elastic#52114
  • Loading branch information
jakelandis committed Mar 5, 2020
1 parent 8980120 commit 66d5f32
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ void copy() {
project.copy(c -> {
c.from(project.zipTree(coreConfig.getSingleFile()));
c.into(getTestSourceSet().getOutput().getResourcesDir()); // this ends up as the same dir as outputDir
c.include(includeCore.get().stream().map(prefix -> COPY_TO + "/" + prefix + "*/**").collect(Collectors.toList()));
if (includeCore.get().isEmpty()) {
c.include(COPY_TO + "/**");
} else {
c.include(includeCore.get().stream().map(prefix -> COPY_TO + "/" + prefix + "*/**").collect(Collectors.toList()));
}
});
}
// only copy x-pack specs if explicitly instructed
Expand Down

0 comments on commit 66d5f32

Please sign in to comment.