Skip to content

Commit

Permalink
Enable customizing REST tests blacklist (#31074)
Browse files Browse the repository at this point in the history
This commit enables adding additional REST tests to the blacklist for
builds that already define tests.rest.blacklist.
  • Loading branch information
jasontedor committed Jun 4, 2018
1 parent af88fab commit 6efd5c0
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ public abstract class ESClientYamlSuiteTestCase extends ESRestTestCase {
* e.g. "-Dtests.rest.blacklist=get/10_basic/*"
*/
public static final String REST_TESTS_BLACKLIST = "tests.rest.blacklist";
/**
* We use tests.rest.blacklist in build files to blacklist tests; this property enables a user to add additional blacklisted tests on
* top of the tests blacklisted in the build.
*/
public static final String REST_TESTS_BLACKLIST_ADDITIONS = "tests.rest.blacklist_additions";
/**
* Property that allows to control whether spec validation is enabled or not (default true).
*/
Expand Down Expand Up @@ -128,6 +133,10 @@ public void initAndResetContext() throws Exception {
for (String entry : blacklist) {
blacklistPathMatchers.add(new BlacklistedPathPatternMatcher(entry));
}
final String[] blacklistAdditions = resolvePathsProperty(REST_TESTS_BLACKLIST_ADDITIONS, null);
for (final String entry : blacklistAdditions) {
blacklistPathMatchers.add(new BlacklistedPathPatternMatcher(entry));
}
}
assert restTestExecutionContext != null;
assert adminExecutionContext != null;
Expand Down

0 comments on commit 6efd5c0

Please sign in to comment.