diff --git a/elasticsearch/qa/messy-test-watcher-with-groovy/src/test/java/org/elasticsearch/messy/tests/GroovyScriptConditionIT.java b/elasticsearch/qa/messy-test-watcher-with-groovy/src/test/java/org/elasticsearch/messy/tests/GroovyScriptConditionIT.java index 2f9facc1b49..404ae21382c 100644 --- a/elasticsearch/qa/messy-test-watcher-with-groovy/src/test/java/org/elasticsearch/messy/tests/GroovyScriptConditionIT.java +++ b/elasticsearch/qa/messy-test-watcher-with-groovy/src/test/java/org/elasticsearch/messy/tests/GroovyScriptConditionIT.java @@ -16,7 +16,7 @@ import org.elasticsearch.watcher.condition.script.ExecutableScriptCondition; import org.elasticsearch.watcher.condition.script.ScriptCondition; import org.elasticsearch.watcher.execution.WatchExecutionContext; import org.elasticsearch.watcher.support.Script; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase; import org.elasticsearch.watcher.watch.Payload; import org.junit.AfterClass; diff --git a/elasticsearch/qa/messy-test-watcher-with-groovy/src/test/java/org/elasticsearch/messy/tests/MessyTestUtils.java b/elasticsearch/qa/messy-test-watcher-with-groovy/src/test/java/org/elasticsearch/messy/tests/MessyTestUtils.java index 7f1510ec1a5..80d629674b8 100644 --- a/elasticsearch/qa/messy-test-watcher-with-groovy/src/test/java/org/elasticsearch/messy/tests/MessyTestUtils.java +++ b/elasticsearch/qa/messy-test-watcher-with-groovy/src/test/java/org/elasticsearch/messy/tests/MessyTestUtils.java @@ -20,7 +20,7 @@ import org.elasticsearch.script.ScriptSettings; import org.elasticsearch.script.groovy.GroovyScriptEngineService; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import org.junit.Ignore; import org.mockito.Mockito; diff --git a/elasticsearch/qa/messy-test-watcher-with-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptConditionSearchIT.java b/elasticsearch/qa/messy-test-watcher-with-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptConditionSearchIT.java index 27ba49d2a0f..456a5ee62fb 100644 --- a/elasticsearch/qa/messy-test-watcher-with-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptConditionSearchIT.java +++ b/elasticsearch/qa/messy-test-watcher-with-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptConditionSearchIT.java @@ -23,7 +23,7 @@ import org.elasticsearch.watcher.condition.script.ExecutableScriptCondition; import org.elasticsearch.watcher.condition.script.ScriptCondition; import org.elasticsearch.watcher.execution.WatchExecutionContext; import org.elasticsearch.watcher.support.Script; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase; import org.elasticsearch.watcher.watch.Payload; import org.junit.After; diff --git a/elasticsearch/qa/messy-test-watcher-with-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptConditionTests.java b/elasticsearch/qa/messy-test-watcher-with-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptConditionTests.java index 556b1dc52a4..0bbbafcfdc7 100644 --- a/elasticsearch/qa/messy-test-watcher-with-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptConditionTests.java +++ b/elasticsearch/qa/messy-test-watcher-with-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptConditionTests.java @@ -14,7 +14,6 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.script.ScriptException; -import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptService.ScriptType; import org.elasticsearch.search.internal.InternalSearchResponse; import org.elasticsearch.test.ESTestCase; @@ -25,7 +24,7 @@ import org.elasticsearch.watcher.condition.script.ScriptCondition; import org.elasticsearch.watcher.condition.script.ScriptConditionFactory; import org.elasticsearch.watcher.execution.WatchExecutionContext; import org.elasticsearch.watcher.support.Script; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import org.elasticsearch.watcher.watch.Payload; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; diff --git a/elasticsearch/qa/smoke-test-watcher-with-mustache/src/test/java/org/elasticsearch/smoketest/WatcherTemplateTests.java b/elasticsearch/qa/smoke-test-watcher-with-mustache/src/test/java/org/elasticsearch/smoketest/WatcherTemplateTests.java index 75b6b155756..e6b418e7dc2 100644 --- a/elasticsearch/qa/smoke-test-watcher-with-mustache/src/test/java/org/elasticsearch/smoketest/WatcherTemplateTests.java +++ b/elasticsearch/qa/smoke-test-watcher-with-mustache/src/test/java/org/elasticsearch/smoketest/WatcherTemplateTests.java @@ -21,7 +21,7 @@ import org.elasticsearch.script.ScriptSettings; import org.elasticsearch.script.mustache.MustacheScriptEngineService; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import org.elasticsearch.watcher.support.text.DefaultTextTemplateEngine; import org.elasticsearch.watcher.support.text.TextTemplate; import org.elasticsearch.watcher.support.text.TextTemplateEngine; diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/Watcher.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/Watcher.java index cc539d63b38..64fdd6cbed4 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/Watcher.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/Watcher.java @@ -52,7 +52,7 @@ import org.elasticsearch.watcher.support.WatcherIndexTemplateRegistry.TemplateCo import org.elasticsearch.watcher.support.clock.ClockModule; import org.elasticsearch.watcher.support.http.HttpClient; import org.elasticsearch.watcher.support.http.HttpClientModule; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import org.elasticsearch.watcher.support.init.proxy.WatcherClientProxy; import org.elasticsearch.watcher.support.secret.SecretModule; import org.elasticsearch.watcher.support.secret.SecretService; @@ -240,7 +240,6 @@ public class Watcher { public void onModule(LazyInitializationModule module) { if (enabled) { module.registerLazyInitializable(WatcherClientProxy.class); - module.registerLazyInitializable(ScriptServiceProxy.class); module.registerLazyInitializable(ChainTransformFactory.class); module.registerLazyInitializable(ChainInputFactory.class); } diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/condition/script/ExecutableScriptCondition.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/condition/script/ExecutableScriptCondition.java index e233e123fd8..5bac6a2ba9e 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/condition/script/ExecutableScriptCondition.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/condition/script/ExecutableScriptCondition.java @@ -11,7 +11,7 @@ import org.elasticsearch.script.ExecutableScript; import org.elasticsearch.watcher.condition.ExecutableCondition; import org.elasticsearch.watcher.execution.WatchExecutionContext; import org.elasticsearch.watcher.support.Variables; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import java.util.Map; diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/condition/script/ScriptConditionFactory.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/condition/script/ScriptConditionFactory.java index bd65fec884d..6173ada4a8c 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/condition/script/ScriptConditionFactory.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/condition/script/ScriptConditionFactory.java @@ -10,7 +10,7 @@ import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.watcher.condition.ConditionFactory; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import java.io.IOException; diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/init/proxy/ScriptServiceProxy.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/ScriptServiceProxy.java similarity index 61% rename from elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/init/proxy/ScriptServiceProxy.java rename to elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/ScriptServiceProxy.java index 3df32ca2524..b9b0ae27976 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/init/proxy/ScriptServiceProxy.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/ScriptServiceProxy.java @@ -3,49 +3,35 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.watcher.support.init.proxy; +package org.elasticsearch.watcher.support; import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.inject.Injector; +import org.elasticsearch.common.inject.Inject; import org.elasticsearch.script.CompiledScript; import org.elasticsearch.script.ExecutableScript; import org.elasticsearch.script.ScriptContext; import org.elasticsearch.script.ScriptService; import org.elasticsearch.shield.SecurityContext; import org.elasticsearch.shield.user.XPackUser; -import org.elasticsearch.watcher.support.Script; -import org.elasticsearch.xpack.common.init.LazyInitializable; import java.util.Map; import static java.util.Collections.emptyMap; /** - *A lazily initialized proxy to the elasticsearch {@link ScriptService}. Inject this proxy whenever the script - * service needs to be injected to avoid circular dependencies issues. + * Wraps {@link ScriptService} but ensure that all scripts are run or compiled as {@link XPackUser}. */ -public class ScriptServiceProxy implements LazyInitializable { +public class ScriptServiceProxy { - private ScriptService service; - private SecurityContext securityContext; - private ClusterService clusterService; + private final ScriptService service; + private final SecurityContext securityContext; + private final ClusterService clusterService; - /** - * Creates a proxy to the given script service (can be used for testing) - */ - public static ScriptServiceProxy of(ScriptService service, ClusterService clusterService) { - ScriptServiceProxy proxy = new ScriptServiceProxy(); - proxy.service = service; - proxy.securityContext = SecurityContext.Insecure.INSTANCE; - proxy.clusterService = clusterService; - return proxy; - } - - @Override - public void init(Injector injector) { - this.service = injector.getInstance(ScriptService.class); - this.securityContext = injector.getInstance(SecurityContext.class); - this.clusterService = injector.getInstance(ClusterService.class); + @Inject + public ScriptServiceProxy(ScriptService service, SecurityContext securityContext, ClusterService clusterService) { + this.service = service; + this.securityContext = securityContext; + this.clusterService = clusterService; } public CompiledScript compile(Script script) { @@ -73,4 +59,11 @@ public class ScriptServiceProxy implements LazyInitializable { return INSTANCE.getKey(); } } + + /** + * Factory helper method for testing. + */ + public static ScriptServiceProxy of(ScriptService service, ClusterService clusterService) { + return new ScriptServiceProxy(service, SecurityContext.Insecure.INSTANCE, clusterService); + } } diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/text/DefaultTextTemplateEngine.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/text/DefaultTextTemplateEngine.java index c079e5da222..680c6b72053 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/text/DefaultTextTemplateEngine.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/text/DefaultTextTemplateEngine.java @@ -13,7 +13,7 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.script.CompiledScript; import org.elasticsearch.script.ExecutableScript; import org.elasticsearch.script.Template; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import java.util.Collections; import java.util.HashMap; diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/transform/script/ExecutableScriptTransform.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/transform/script/ExecutableScriptTransform.java index 3adf6f95e0a..aa8b0fbe6ee 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/transform/script/ExecutableScriptTransform.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/transform/script/ExecutableScriptTransform.java @@ -10,7 +10,7 @@ import org.elasticsearch.script.CompiledScript; import org.elasticsearch.script.ExecutableScript; import org.elasticsearch.watcher.execution.WatchExecutionContext; import org.elasticsearch.watcher.support.Script; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import org.elasticsearch.watcher.transform.ExecutableTransform; import org.elasticsearch.watcher.watch.Payload; diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/transform/script/ScriptTransformFactory.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/transform/script/ScriptTransformFactory.java index 27b0d3c2cdd..18d330f5e62 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/transform/script/ScriptTransformFactory.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/transform/script/ScriptTransformFactory.java @@ -9,7 +9,7 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import org.elasticsearch.watcher.transform.TransformFactory; import java.io.IOException; diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/watch/WatchModule.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/watch/WatchModule.java index 0f4bdf70a2a..888e7156279 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/watch/WatchModule.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/watch/WatchModule.java @@ -7,6 +7,7 @@ package org.elasticsearch.watcher.watch; import org.elasticsearch.common.inject.AbstractModule; import org.elasticsearch.watcher.WatcherService; +import org.elasticsearch.watcher.support.ScriptServiceProxy; /** * @@ -19,5 +20,6 @@ public class WatchModule extends AbstractModule { bind(WatchLockService.class).asEagerSingleton(); bind(WatcherService.class).asEagerSingleton(); bind(WatchStore.class).asEagerSingleton(); + bind(ScriptServiceProxy.class).asEagerSingleton(); } } diff --git a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/condition/script/ScriptConditionSearchTests.java b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/condition/script/ScriptConditionSearchTests.java index 416a8c7d6f6..c7b31c95c5f 100644 --- a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/condition/script/ScriptConditionSearchTests.java +++ b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/condition/script/ScriptConditionSearchTests.java @@ -20,7 +20,7 @@ import org.elasticsearch.search.internal.InternalSearchResponse; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.execution.WatchExecutionContext; import org.elasticsearch.watcher.support.Script; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase; import org.elasticsearch.watcher.test.WatcherTestUtils; import org.elasticsearch.watcher.watch.Payload; diff --git a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/condition/script/ScriptConditionTests.java b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/condition/script/ScriptConditionTests.java index 2c325fb2024..eb7aaaab607 100644 --- a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/condition/script/ScriptConditionTests.java +++ b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/condition/script/ScriptConditionTests.java @@ -15,7 +15,6 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.script.ScriptException; -import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptService.ScriptType; import org.elasticsearch.search.internal.InternalSearchResponse; import org.elasticsearch.test.ESTestCase; @@ -23,7 +22,7 @@ import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.condition.Condition; import org.elasticsearch.watcher.execution.WatchExecutionContext; import org.elasticsearch.watcher.support.Script; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import org.elasticsearch.watcher.watch.Payload; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; diff --git a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/support/text/TextTemplateTests.java b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/support/text/TextTemplateTests.java index 2185815f4cc..d9fcdb65f68 100644 --- a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/support/text/TextTemplateTests.java +++ b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/support/text/TextTemplateTests.java @@ -17,10 +17,7 @@ import org.elasticsearch.script.ExecutableScript; import org.elasticsearch.script.ScriptService.ScriptType; import org.elasticsearch.script.Template; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; -import org.elasticsearch.watcher.support.text.DefaultTextTemplateEngine; -import org.elasticsearch.watcher.support.text.TextTemplate; -import org.elasticsearch.watcher.support.text.TextTemplateEngine; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import org.junit.Before; import java.util.Collections; diff --git a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/test/AbstractWatcherIntegrationTestCase.java b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/test/AbstractWatcherIntegrationTestCase.java index 03931ff18c5..68a949bcb51 100644 --- a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/test/AbstractWatcherIntegrationTestCase.java +++ b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/test/AbstractWatcherIntegrationTestCase.java @@ -54,7 +54,7 @@ import org.elasticsearch.watcher.WatcherLicensee; import org.elasticsearch.watcher.support.WatcherIndexTemplateRegistry; import org.elasticsearch.watcher.support.clock.ClockMock; import org.elasticsearch.watcher.support.http.HttpClient; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import org.elasticsearch.watcher.support.xcontent.XContentSource; import org.elasticsearch.watcher.trigger.ScheduleTriggerEngineMock; import org.elasticsearch.watcher.trigger.TriggerService; diff --git a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/test/WatcherTestUtils.java b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/test/WatcherTestUtils.java index 4d9758c9e57..a268c1a981c 100644 --- a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/test/WatcherTestUtils.java +++ b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/test/WatcherTestUtils.java @@ -54,7 +54,7 @@ import org.elasticsearch.watcher.support.http.HttpClient; import org.elasticsearch.watcher.support.http.HttpMethod; import org.elasticsearch.watcher.support.http.HttpRequestTemplate; import org.elasticsearch.watcher.support.init.proxy.WatcherClientProxy; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import org.elasticsearch.watcher.support.secret.Secret; import org.elasticsearch.watcher.support.text.TextTemplate; import org.elasticsearch.watcher.support.text.TextTemplateEngine; diff --git a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/transform/script/ScriptTransformTests.java b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/transform/script/ScriptTransformTests.java index 71b0dbc4801..e801635ba04 100644 --- a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/transform/script/ScriptTransformTests.java +++ b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/transform/script/ScriptTransformTests.java @@ -19,7 +19,7 @@ import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.execution.WatchExecutionContext; import org.elasticsearch.watcher.support.Script; import org.elasticsearch.watcher.support.Variables; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import org.elasticsearch.watcher.transform.Transform; import org.elasticsearch.watcher.watch.Payload; import org.junit.After; diff --git a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/watch/WatchTests.java b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/watch/WatchTests.java index a059b29de4e..dd26eca7ff7 100644 --- a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/watch/WatchTests.java +++ b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/watch/WatchTests.java @@ -85,7 +85,7 @@ import org.elasticsearch.watcher.support.http.HttpMethod; import org.elasticsearch.watcher.support.http.HttpRequestTemplate; import org.elasticsearch.watcher.support.http.auth.HttpAuthRegistry; import org.elasticsearch.watcher.support.http.auth.basic.BasicAuthFactory; -import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy; +import org.elasticsearch.watcher.support.ScriptServiceProxy; import org.elasticsearch.watcher.support.init.proxy.WatcherClientProxy; import org.elasticsearch.watcher.support.secret.SecretService; import org.elasticsearch.watcher.support.text.TextTemplate;