From 64d3f5f4e1939d707069d18c5537444ff39363fc Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Wed, 16 Jun 2021 09:49:23 +0200 Subject: [PATCH] Move deprecation code from xpack core to deprecation module. (#74120) This reduces the number of imports and all deprecation code is now in one place. Also removed DeprecationChecksTests test case from x-pack core, because the same test already exists in the deprecation module. --- .../xpack/core/XPackClientPlugin.java | 3 -- .../deprecation/DeprecationChecksTests.java | 33 ------------------- .../xpack/deprecation/Deprecation.java | 2 -- .../xpack/deprecation/DeprecationChecker.java | 1 - .../xpack/deprecation/DeprecationChecks.java | 2 -- .../deprecation/DeprecationInfoAction.java | 27 +++------------ .../xpack}/deprecation/DeprecationIssue.java | 2 +- .../deprecation/IndexDeprecationChecks.java | 1 - .../deprecation/MlDeprecationChecker.java | 1 - .../deprecation/NodeDeprecationChecks.java | 1 - .../NodesDeprecationCheckAction.java | 2 +- .../NodesDeprecationCheckRequest.java | 2 +- .../NodesDeprecationCheckResponse.java | 2 +- .../RestDeprecationInfoAction.java | 3 +- .../TransportDeprecationInfoAction.java | 4 --- .../TransportNodeDeprecationCheckAction.java | 5 --- .../deprecation/DeprecationChecksTests.java | 2 -- .../DeprecationInfoActionRequestTests.java | 2 +- .../DeprecationInfoActionResponseTests.java | 4 +-- .../deprecation/DeprecationIssueTests.java | 4 +-- .../IndexDeprecationChecksTests.java | 1 - .../NodeDeprecationChecksTests.java | 1 - .../NodesDeprecationCheckRequestTests.java | 2 +- .../NodesDeprecationCheckResponseTests.java | 2 +- .../TransportDeprecationInfoActionTests.java | 1 - 25 files changed, 16 insertions(+), 94 deletions(-) delete mode 100644 x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationChecksTests.java rename x-pack/plugin/{core/src/main/java/org/elasticsearch/xpack/core => deprecation/src/main/java/org/elasticsearch/xpack}/deprecation/DeprecationInfoAction.java (94%) rename x-pack/plugin/{core/src/main/java/org/elasticsearch/xpack/core => deprecation/src/main/java/org/elasticsearch/xpack}/deprecation/DeprecationIssue.java (98%) rename x-pack/plugin/{core/src/main/java/org/elasticsearch/xpack/core => deprecation/src/main/java/org/elasticsearch/xpack}/deprecation/NodesDeprecationCheckAction.java (98%) rename x-pack/plugin/{core/src/main/java/org/elasticsearch/xpack/core => deprecation/src/main/java/org/elasticsearch/xpack}/deprecation/NodesDeprecationCheckRequest.java (96%) rename x-pack/plugin/{core/src/main/java/org/elasticsearch/xpack/core => deprecation/src/main/java/org/elasticsearch/xpack}/deprecation/NodesDeprecationCheckResponse.java (97%) rename x-pack/plugin/{core/src/test/java/org/elasticsearch/xpack/core => deprecation/src/test/java/org/elasticsearch/xpack}/deprecation/DeprecationInfoActionRequestTests.java (94%) rename x-pack/plugin/{core/src/test/java/org/elasticsearch/xpack/core => deprecation/src/test/java/org/elasticsearch/xpack}/deprecation/DeprecationInfoActionResponseTests.java (97%) rename x-pack/plugin/{core/src/test/java/org/elasticsearch/xpack/core => deprecation/src/test/java/org/elasticsearch/xpack}/deprecation/DeprecationIssueTests.java (95%) rename x-pack/plugin/{core/src/test/java/org/elasticsearch/xpack/core => deprecation/src/test/java/org/elasticsearch/xpack}/deprecation/NodesDeprecationCheckRequestTests.java (96%) rename x-pack/plugin/{core/src/test/java/org/elasticsearch/xpack/core => deprecation/src/test/java/org/elasticsearch/xpack}/deprecation/NodesDeprecationCheckResponseTests.java (98%) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackClientPlugin.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackClientPlugin.java index f42a6d010bc3b..7ced3482fb4dd 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackClientPlugin.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackClientPlugin.java @@ -40,7 +40,6 @@ import org.elasticsearch.xpack.core.async.DeleteAsyncResultAction; import org.elasticsearch.xpack.core.ccr.AutoFollowMetadata; import org.elasticsearch.xpack.core.datastreams.DataStreamFeatureSetUsage; -import org.elasticsearch.xpack.core.deprecation.DeprecationInfoAction; import org.elasticsearch.xpack.core.enrich.EnrichFeatureSetUsage; import org.elasticsearch.xpack.core.enrich.action.ExecuteEnrichPolicyStatus; import org.elasticsearch.xpack.core.eql.EqlFeatureSetUsage; @@ -268,8 +267,6 @@ public List> getSettings() { @Override public List> getClientActions() { List> actions = new ArrayList<>(Arrays.asList( - // deprecation - DeprecationInfoAction.INSTANCE, // graph GraphExploreAction.INSTANCE, // ML diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationChecksTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationChecksTests.java deleted file mode 100644 index c2ffb7dfd0c7e..0000000000000 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationChecksTests.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -package org.elasticsearch.xpack.core.deprecation; - -import org.elasticsearch.test.ESTestCase; - -import java.util.ArrayList; -import java.util.List; -import java.util.function.Supplier; - -import static org.hamcrest.core.IsEqual.equalTo; - -public class DeprecationChecksTests extends ESTestCase { - - public void testFilterChecks() { - DeprecationIssue issue = DeprecationIssueTests.createTestInstance(); - int numChecksPassed = randomIntBetween(0, 5); - int numChecksFailed = 10 - numChecksPassed; - List> checks = new ArrayList<>(); - for (int i = 0; i < numChecksFailed; i++) { - checks.add(() -> issue); - } - for (int i = 0; i < numChecksPassed; i++) { - checks.add(() -> null); - } - List filteredIssues = DeprecationInfoAction.filterChecks(checks, Supplier::get); - assertThat(filteredIssues.size(), equalTo(numChecksFailed)); - } -} diff --git a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/Deprecation.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/Deprecation.java index 222bc4899fed0..da02e271935fe 100644 --- a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/Deprecation.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/Deprecation.java @@ -29,8 +29,6 @@ import org.elasticsearch.script.ScriptService; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.core.deprecation.DeprecationInfoAction; -import org.elasticsearch.xpack.core.deprecation.NodesDeprecationCheckAction; import org.elasticsearch.xpack.deprecation.logging.DeprecationIndexingComponent; import org.elasticsearch.xpack.deprecation.logging.DeprecationIndexingTemplateRegistry; diff --git a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationChecker.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationChecker.java index 7e64ea8c47113..c0cbe68995d71 100644 --- a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationChecker.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationChecker.java @@ -12,7 +12,6 @@ import org.elasticsearch.client.OriginSettingClient; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.xpack.core.deprecation.DeprecationIssue; import java.util.List; diff --git a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationChecks.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationChecks.java index 2426c370f14c1..0bc36927abb6d 100644 --- a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationChecks.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationChecks.java @@ -10,8 +10,6 @@ import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.metadata.IndexMetadata; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.core.deprecation.DeprecationInfoAction; -import org.elasticsearch.xpack.core.deprecation.DeprecationIssue; import java.util.Collections; import java.util.List; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoAction.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationInfoAction.java similarity index 94% rename from x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoAction.java rename to x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationInfoAction.java index a380f7788b4a5..7c05864b87ea1 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoAction.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationInfoAction.java @@ -4,23 +4,20 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -package org.elasticsearch.xpack.core.deprecation; +package org.elasticsearch.xpack.deprecation; import org.elasticsearch.ElasticsearchStatusException; import org.elasticsearch.Version; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.ActionResponse; -import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.ActionType; +import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.admin.cluster.node.info.NodeInfo; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder; import org.elasticsearch.action.support.master.MasterNodeReadRequest; -import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.metadata.IndexMetadata; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; -import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.util.set.Sets; @@ -218,12 +215,8 @@ public static DeprecationInfoAction.Response from(ClusterState state, public static class Request extends MasterNodeReadRequest implements IndicesRequest.Replaceable { - private String[] indices = Strings.EMPTY_ARRAY; - private static final IndicesOptions INDICES_OPTIONS = IndicesOptions.fromOptions(false, true, - true, true); - - public Request() { - } + private static final IndicesOptions INDICES_OPTIONS = IndicesOptions.fromOptions(false, true, true, true); + private String[] indices; public Request(String... indices) { this.indices = indices; @@ -285,16 +278,4 @@ public int hashCode() { } - public static class RequestBuilder extends MasterNodeReadOperationRequestBuilder { - - protected RequestBuilder(ElasticsearchClient client, DeprecationInfoAction action) { - super(client, action, new Request()); - } - - public RequestBuilder setIndices(String... indices) { - request.indices(indices); - return this; - } - } - } diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/DeprecationIssue.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationIssue.java similarity index 98% rename from x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/DeprecationIssue.java rename to x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationIssue.java index 5b7e01c61fcf4..7715e932d3e58 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/DeprecationIssue.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationIssue.java @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -package org.elasticsearch.xpack.core.deprecation; +package org.elasticsearch.xpack.deprecation; import org.elasticsearch.core.Nullable; diff --git a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecks.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecks.java index 56fb119519d4d..f91f9a628d705 100644 --- a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecks.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecks.java @@ -10,7 +10,6 @@ import org.elasticsearch.Version; import org.elasticsearch.cluster.metadata.IndexMetadata; import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.xpack.core.deprecation.DeprecationIssue; import java.util.Locale; diff --git a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/MlDeprecationChecker.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/MlDeprecationChecker.java index 2549c9ebe8d33..e0ef837b3c6e9 100644 --- a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/MlDeprecationChecker.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/MlDeprecationChecker.java @@ -14,7 +14,6 @@ import org.elasticsearch.common.xcontent.XContentElasticsearchExtension; import org.elasticsearch.xpack.core.XPackSettings; import org.elasticsearch.xpack.core.action.util.PageParams; -import org.elasticsearch.xpack.core.deprecation.DeprecationIssue; import org.elasticsearch.xpack.core.ml.action.GetDatafeedsAction; import org.elasticsearch.xpack.core.ml.action.GetModelSnapshotsAction; import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; diff --git a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecks.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecks.java index 9750efd17792b..4da6f8f09ae32 100644 --- a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecks.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecks.java @@ -12,7 +12,6 @@ import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; -import org.elasticsearch.xpack.core.deprecation.DeprecationIssue; import org.elasticsearch.xpack.core.security.authc.RealmConfig; import org.elasticsearch.xpack.core.security.authc.RealmSettings; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/NodesDeprecationCheckAction.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodesDeprecationCheckAction.java similarity index 98% rename from x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/NodesDeprecationCheckAction.java rename to x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodesDeprecationCheckAction.java index 49a6798d0add5..2233bb2556bb1 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/NodesDeprecationCheckAction.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodesDeprecationCheckAction.java @@ -5,7 +5,7 @@ * 2.0. */ -package org.elasticsearch.xpack.core.deprecation; +package org.elasticsearch.xpack.deprecation; import org.elasticsearch.action.ActionType; import org.elasticsearch.action.support.nodes.BaseNodeResponse; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/NodesDeprecationCheckRequest.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodesDeprecationCheckRequest.java similarity index 96% rename from x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/NodesDeprecationCheckRequest.java rename to x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodesDeprecationCheckRequest.java index 8ad5b28582e25..136fa12d53335 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/NodesDeprecationCheckRequest.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodesDeprecationCheckRequest.java @@ -5,7 +5,7 @@ * 2.0. */ -package org.elasticsearch.xpack.core.deprecation; +package org.elasticsearch.xpack.deprecation; import org.elasticsearch.action.support.nodes.BaseNodesRequest; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/NodesDeprecationCheckResponse.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodesDeprecationCheckResponse.java similarity index 97% rename from x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/NodesDeprecationCheckResponse.java rename to x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodesDeprecationCheckResponse.java index 9e9e21420e4ee..41c9c0cf84a7c 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/deprecation/NodesDeprecationCheckResponse.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodesDeprecationCheckResponse.java @@ -5,7 +5,7 @@ * 2.0. */ -package org.elasticsearch.xpack.core.deprecation; +package org.elasticsearch.xpack.deprecation; import org.elasticsearch.action.FailedNodeException; import org.elasticsearch.action.support.nodes.BaseNodesResponse; diff --git a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/RestDeprecationInfoAction.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/RestDeprecationInfoAction.java index 5e7aeb7471969..9ceb2b2336232 100644 --- a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/RestDeprecationInfoAction.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/RestDeprecationInfoAction.java @@ -11,8 +11,7 @@ import org.elasticsearch.rest.BaseRestHandler; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestToXContentListener; -import org.elasticsearch.xpack.core.deprecation.DeprecationInfoAction; -import org.elasticsearch.xpack.core.deprecation.DeprecationInfoAction.Request; +import org.elasticsearch.xpack.deprecation.DeprecationInfoAction.Request; import java.io.IOException; import java.util.List; diff --git a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/TransportDeprecationInfoAction.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/TransportDeprecationInfoAction.java index 0c39d1f5f6bf4..cccd97689ad5d 100644 --- a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/TransportDeprecationInfoAction.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/TransportDeprecationInfoAction.java @@ -27,10 +27,6 @@ import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; import org.elasticsearch.xpack.core.ClientHelper; -import org.elasticsearch.xpack.core.deprecation.DeprecationInfoAction; -import org.elasticsearch.xpack.core.deprecation.DeprecationIssue; -import org.elasticsearch.xpack.core.deprecation.NodesDeprecationCheckAction; -import org.elasticsearch.xpack.core.deprecation.NodesDeprecationCheckRequest; import java.util.Collections; import java.util.List; diff --git a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/TransportNodeDeprecationCheckAction.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/TransportNodeDeprecationCheckAction.java index d3629a555987c..886f7b99bb8b8 100644 --- a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/TransportNodeDeprecationCheckAction.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/TransportNodeDeprecationCheckAction.java @@ -18,11 +18,6 @@ import org.elasticsearch.tasks.Task; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.core.deprecation.DeprecationInfoAction; -import org.elasticsearch.xpack.core.deprecation.DeprecationIssue; -import org.elasticsearch.xpack.core.deprecation.NodesDeprecationCheckAction; -import org.elasticsearch.xpack.core.deprecation.NodesDeprecationCheckRequest; -import org.elasticsearch.xpack.core.deprecation.NodesDeprecationCheckResponse; import java.io.IOException; import java.util.List; diff --git a/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationChecksTests.java b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationChecksTests.java index 1a21a153d6966..354dc14b4c3b0 100644 --- a/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationChecksTests.java +++ b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationChecksTests.java @@ -8,8 +8,6 @@ package org.elasticsearch.xpack.deprecation; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.core.deprecation.DeprecationInfoAction; -import org.elasticsearch.xpack.core.deprecation.DeprecationIssue; import java.util.ArrayList; import java.util.List; diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoActionRequestTests.java b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationInfoActionRequestTests.java similarity index 94% rename from x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoActionRequestTests.java rename to x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationInfoActionRequestTests.java index e2b9960c71551..34703fe6d3613 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoActionRequestTests.java +++ b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationInfoActionRequestTests.java @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -package org.elasticsearch.xpack.core.deprecation; +package org.elasticsearch.xpack.deprecation; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.test.AbstractWireSerializingTestCase; diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoActionResponseTests.java b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationInfoActionResponseTests.java similarity index 97% rename from x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoActionResponseTests.java rename to x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationInfoActionResponseTests.java index ab16dcb058562..c4d02b78d9dff 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationInfoActionResponseTests.java +++ b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationInfoActionResponseTests.java @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -package org.elasticsearch.xpack.core.deprecation; +package org.elasticsearch.xpack.deprecation; import org.elasticsearch.ElasticsearchStatusException; import org.elasticsearch.Version; @@ -35,7 +35,7 @@ import java.util.stream.Stream; import static java.util.Collections.emptyList; -import static org.elasticsearch.xpack.core.deprecation.DeprecationInfoAction.Response.RESERVED_NAMES; +import static org.elasticsearch.xpack.deprecation.DeprecationInfoAction.Response.RESERVED_NAMES; import static org.hamcrest.Matchers.empty; import static org.hamcrest.core.IsEqual.equalTo; diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationIssueTests.java b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationIssueTests.java similarity index 95% rename from x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationIssueTests.java rename to x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationIssueTests.java index b9d09a1653c34..e313926d1f402 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/DeprecationIssueTests.java +++ b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationIssueTests.java @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -package org.elasticsearch.xpack.core.deprecation; +package org.elasticsearch.xpack.deprecation; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.BytesStreamOutput; @@ -19,7 +19,7 @@ import java.util.Map; import static org.elasticsearch.common.xcontent.ToXContent.EMPTY_PARAMS; -import static org.elasticsearch.xpack.core.deprecation.DeprecationIssue.Level; +import static org.elasticsearch.xpack.deprecation.DeprecationIssue.Level; import static org.hamcrest.core.IsEqual.equalTo; public class DeprecationIssueTests extends ESTestCase { diff --git a/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecksTests.java b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecksTests.java index ca75d448aaed5..4b15cc5b66636 100644 --- a/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecksTests.java +++ b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecksTests.java @@ -12,7 +12,6 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.IndexSettings; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.core.deprecation.DeprecationIssue; import java.util.List; diff --git a/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecksTests.java b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecksTests.java index 62aad53941b9f..0de5baadfc987 100644 --- a/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecksTests.java +++ b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecksTests.java @@ -13,7 +13,6 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.core.deprecation.DeprecationIssue; import java.util.ArrayList; import java.util.List; diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/NodesDeprecationCheckRequestTests.java b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodesDeprecationCheckRequestTests.java similarity index 96% rename from x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/NodesDeprecationCheckRequestTests.java rename to x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodesDeprecationCheckRequestTests.java index 3e1d53af7617c..d073637b548d3 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/NodesDeprecationCheckRequestTests.java +++ b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodesDeprecationCheckRequestTests.java @@ -5,7 +5,7 @@ * 2.0. */ -package org.elasticsearch.xpack.core.deprecation; +package org.elasticsearch.xpack.deprecation; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.test.AbstractWireSerializingTestCase; diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/NodesDeprecationCheckResponseTests.java b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodesDeprecationCheckResponseTests.java similarity index 98% rename from x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/NodesDeprecationCheckResponseTests.java rename to x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodesDeprecationCheckResponseTests.java index a75398c4b82cb..dae8375b73d7f 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/deprecation/NodesDeprecationCheckResponseTests.java +++ b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodesDeprecationCheckResponseTests.java @@ -5,7 +5,7 @@ * 2.0. */ -package org.elasticsearch.xpack.core.deprecation; +package org.elasticsearch.xpack.deprecation; import org.elasticsearch.Version; import org.elasticsearch.action.FailedNodeException; diff --git a/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/TransportDeprecationInfoActionTests.java b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/TransportDeprecationInfoActionTests.java index 532e20accc9d7..2ae4a9016b329 100644 --- a/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/TransportDeprecationInfoActionTests.java +++ b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/TransportDeprecationInfoActionTests.java @@ -11,7 +11,6 @@ import org.elasticsearch.action.support.PlainActionFuture; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.core.deprecation.DeprecationIssue; import java.util.Arrays; import java.util.Collections;