Add missed action to KnownActionsTests (elastic/x-pack-elasticsearch#1633)

Patching KnownActionsTests for now until we can decided what we want to do with it in a long term in elastic/x-pack-elasticsearch#1489

Original commit: elastic/x-pack-elasticsearch@9f9288c0e2
This commit is contained in:
Igor Motov 2017-06-06 16:42:00 -04:00 committed by GitHub
parent 48c34ec8ac
commit 55a8bc87e4
2 changed files with 9 additions and 17 deletions

View File

@ -6,6 +6,7 @@
package org.elasticsearch.transport; package org.elasticsearch.transport;
import org.apache.lucene.util.IOUtils; import org.apache.lucene.util.IOUtils;
import org.elasticsearch.Version;
import org.elasticsearch.action.Action; import org.elasticsearch.action.Action;
import org.elasticsearch.common.io.FileSystemUtils; import org.elasticsearch.common.io.FileSystemUtils;
import org.elasticsearch.common.io.PathUtils; import org.elasticsearch.common.io.PathUtils;
@ -18,9 +19,6 @@ import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecurityIntegTestCase;
import org.elasticsearch.test.discovery.TestZenDiscovery; import org.elasticsearch.test.discovery.TestZenDiscovery;
import org.elasticsearch.xpack.XPackPlugin; import org.elasticsearch.xpack.XPackPlugin;
import org.elasticsearch.xpack.graph.Graph;
import org.elasticsearch.xpack.ml.MachineLearning;
import org.elasticsearch.xpack.security.action.SecurityActionModule;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import java.io.IOException; import java.io.IOException;
@ -127,25 +125,16 @@ public class KnownActionsTests extends SecurityIntegTestCase {
private static Set<String> loadCodeActions() throws IOException, ReflectiveOperationException, URISyntaxException { private static Set<String> loadCodeActions() throws IOException, ReflectiveOperationException, URISyntaxException {
Set<String> actions = new HashSet<>(); Set<String> actions = new HashSet<>();
// loading es core actions // loading es core actions in org.elasticsearch package
loadActions(collectSubClasses(Action.class, Action.class), actions); loadActions(collectSubClasses(Action.class, Version.class), actions);
// loading all xpack top level actions // loading all xpack top level actions in org.elasticsearch.xpack package
loadActions(collectSubClasses(Action.class, XPackPlugin.class), actions); loadActions(collectSubClasses(Action.class, XPackPlugin.class), actions);
// loading security actions // also loading all actions from the licensing plugin in org.elasticsearch.license package
loadActions(collectSubClasses(Action.class, SecurityActionModule.class), actions);
// also loading all actions from the licensing plugin
loadActions(collectSubClasses(Action.class, Licensing.class), actions); loadActions(collectSubClasses(Action.class, Licensing.class), actions);
// also loading all actions from the graph plugin // also load stuff from Reindex in org.elasticsearch.index.reindex package
loadActions(collectSubClasses(Action.class, Graph.class), actions);
// also loading all actions from the machine learning plugin
loadActions(collectSubClasses(Action.class, MachineLearning.class), actions);
// also load stuff from Reindex
loadActions(collectSubClasses(Action.class, ReindexPlugin.class), actions); loadActions(collectSubClasses(Action.class, ReindexPlugin.class), actions);
return unmodifiableSet(actions); return unmodifiableSet(actions);

View File

@ -152,3 +152,6 @@ cluster:admin/persistent/update_status
cluster:admin/persistent/remove cluster:admin/persistent/remove
cluster:internal/xpack/ml/job/finalize_job_execution cluster:internal/xpack/ml/job/finalize_job_execution
cluster:admin/reindex/rethrottle cluster:admin/reindex/rethrottle
indices:data/write/update/byquery
indices:data/write/delete/byquery
indices:data/write/reindex