Enable customizing REST tests blacklist
This commit enables adding additional REST tests to the blacklist for
builds that already define tests.rest.blacklist.
@@ -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).
*/
@@ -128,6 +133,10 @@ public abstract class ESClientYamlSuiteTestCase extends ESRestTestCase {
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;
