Settings - change over to o.e.common.settings.Setting for http.enabled setting

Original commit: elastic/x-pack-elasticsearch@3b551a6fb6
This commit is contained in:
markharwood 2016-01-22 13:20:11 +00:00
parent 80aa3e29dd
commit 03944c9a95
29 changed files with 57 additions and 30 deletions

View File

@ -6,6 +6,7 @@
package org.elasticsearch.license.plugin;
import org.elasticsearch.client.ClusterAdminClient;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.license.core.License;
@ -64,7 +65,7 @@ public class LicensesServiceClusterTests extends AbstractLicensesIntegrationTest
.put("_trial_license_duration_in_seconds", 9)
// this setting is only used in tests
.put("_grace_duration_in_seconds", 9)
.put(Node.HTTP_ENABLED, true);
.put(NetworkModule.HTTP_ENABLED.getKey(), true);
}
@Override

View File

@ -5,6 +5,7 @@
*/
package org.elasticsearch.license.plugin;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.license.plugin.consumer.EagerLicenseRegistrationConsumerPlugin;
import org.elasticsearch.license.plugin.consumer.EagerLicenseRegistrationPluginService;
@ -27,7 +28,7 @@ public class LicensesServiceNodeTests extends AbstractLicensesIntegrationTestCas
protected Settings nodeSettings(int nodeOrdinal) {
return Settings.settingsBuilder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.build();
}

View File

@ -54,7 +54,7 @@ public class AbstractCollectorTestCase extends MarvelIntegTestCase {
protected Settings nodeSettings(int nodeOrdinal) {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, false)
.put(NetworkModule.HTTP_ENABLED.getKey(), false)
.put(MarvelSettings.INTERVAL_SETTING.getKey(), "-1")
.build();
}

View File

@ -6,6 +6,7 @@
package org.elasticsearch.marvel.agent.settings;
import org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequestBuilder;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Setting;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
@ -38,7 +39,7 @@ public class MarvelSettingsTests extends MarvelIntegTestCase {
protected Settings nodeSettings(int nodeOrdinal) {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, false)
.put(NetworkModule.HTTP_ENABLED.getKey(), false)
.put(marvelSettings())
.build();
}

View File

@ -7,6 +7,7 @@ package org.elasticsearch.marvel.shield;
import org.elasticsearch.ElasticsearchSecurityException;
import org.elasticsearch.action.ActionRequestBuilder;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.IndexNotFoundException;
import org.elasticsearch.marvel.agent.exporter.MarvelTemplateUtils;
@ -24,7 +25,7 @@ public class SecuredClientTests extends MarvelIntegTestCase {
protected Settings nodeSettings(int nodeOrdinal) {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, false)
.put(NetworkModule.HTTP_ENABLED.getKey(), false)
.put(MarvelSettings.INTERVAL_SETTING.getKey(), "-1")
.build();
}

View File

@ -8,6 +8,7 @@ package org.elasticsearch.integration;
import org.elasticsearch.action.bulk.BulkResponse;
import org.elasticsearch.action.get.GetResponse;
import org.elasticsearch.action.update.UpdateResponse;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.node.Node;
import org.elasticsearch.shield.ShieldPlugin;
@ -29,7 +30,7 @@ public class BulkUpdateTests extends ShieldIntegTestCase {
public Settings nodeSettings(int nodeOrdinal) {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.put(ShieldPlugin.DLS_FLS_ENABLED_SETTING, randomBoolean())
.build();
}

View File

@ -9,6 +9,7 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.http.HttpServerTransport;
import org.elasticsearch.node.Node;
@ -188,7 +189,7 @@ public class ClearRealmsCacheTests extends ShieldIntegTestCase {
public Settings nodeSettings(int nodeOrdinal) {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.build();
}
@Override

View File

@ -9,6 +9,7 @@ import org.elasticsearch.action.delete.DeleteResponse;
import org.elasticsearch.action.update.UpdateResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.node.Node;
@ -101,7 +102,7 @@ public class ClearRolesCacheTests extends ShieldIntegTestCase {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put("shield.authc.native.reload.interval", TimeValue.timeValueSeconds(2L))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.build();
}

View File

@ -8,6 +8,7 @@ package org.elasticsearch.integration;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse;
import org.elasticsearch.cluster.SnapshotsInProgress;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.node.Node;
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
@ -61,7 +62,7 @@ public class ClusterPrivilegeTests extends AbstractPrivilegeTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
return Settings.builder().put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.put("action.disable_shutdown", true)
.put("path.repo", repositoryLocation)
.build();

View File

@ -6,6 +6,7 @@
package org.elasticsearch.integration;
import org.apache.lucene.util.LuceneTestCase.BadApple;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.node.Node;
import org.elasticsearch.test.rest.client.http.HttpResponse;
@ -118,7 +119,7 @@ public class IndexPrivilegeTests extends AbstractPrivilegeTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
return Settings.builder().put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.put("action.disable_shutdown", true)
.build();
}

View File

@ -100,7 +100,7 @@ public class LicensingTests extends ShieldIntegTestCase {
@Override
public Settings nodeSettings(int nodeOrdinal) {
return Settings.builder().put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.build();
}

View File

@ -7,6 +7,7 @@ package org.elasticsearch.integration;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentParser;
@ -48,7 +49,7 @@ public class SettingsFilterTests extends ShieldIntegTestCase {
protected Settings nodeSettings(int nodeOrdinal) {
int clientProfilePort = randomIntBetween(49000, 65400);
return Settings.builder().put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.put("shield.authc.realms.esusers.type", "esusers")

View File

@ -7,6 +7,7 @@ package org.elasticsearch.shield;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.http.HttpServerTransport;
import org.elasticsearch.integration.LicensingTests;
@ -67,7 +68,7 @@ public class ShieldPluginEnabledDisabledTests extends ShieldIntegTestCase {
return Settings.settingsBuilder()
.put(super.nodeSettings(nodeOrdinal))
.put(ShieldPlugin.ENABLED_SETTING_NAME, enabled)
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.build();
}

View File

@ -10,6 +10,7 @@ import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.elasticsearch.common.io.Streams;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.common.transport.TransportAddress;
@ -34,7 +35,7 @@ public class AnonymousUserTests extends ShieldIntegTestCase {
public Settings nodeSettings(int nodeOrdinal) {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.put("shield.authc.anonymous.roles", "anonymous")
.put(AnonymousService.SETTING_AUTHORIZATION_EXCEPTION_ENABLED, authorizationExceptionsEnabled)
.build();

View File

@ -10,6 +10,7 @@ import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.action.admin.cluster.node.info.NodeInfo;
import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.TransportAddress;
import org.elasticsearch.node.Node;
@ -40,7 +41,7 @@ public class RunAsIntegTests extends ShieldIntegTestCase {
public Settings nodeSettings(int nodeOrdinal) {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.build();
}

View File

@ -13,6 +13,7 @@ import org.apache.http.util.EntityUtils;
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.client.transport.NoNodeAvailableException;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.common.transport.TransportAddress;
@ -50,7 +51,7 @@ public class PkiAuthenticationTests extends ShieldIntegTestCase {
protected Settings nodeSettings(int nodeOrdinal) {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.put(ShieldNettyHttpServerTransport.HTTP_SSL_SETTING, true)
.put(ShieldNettyHttpServerTransport.HTTP_CLIENT_AUTH_SETTING, randomBoolean() ? SSLClientAuth.REQUIRED : SSLClientAuth.OPTIONAL)
.put("shield.authc.realms.esusers.type", "esusers")

View File

@ -8,6 +8,7 @@ package org.elasticsearch.shield.authc.pki;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.http.HttpServerTransport;
@ -52,7 +53,7 @@ public class PkiOptionalClientAuthTests extends ShieldIntegTestCase {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.put(ShieldNettyHttpServerTransport.HTTP_SSL_SETTING, true)
.put(ShieldNettyHttpServerTransport.HTTP_CLIENT_AUTH_SETTING, SSLClientAuth.OPTIONAL)
.put("shield.authc.realms.esusers.type", "esusers")

View File

@ -9,6 +9,7 @@ package org.elasticsearch.shield.authc.pki;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.elasticsearch.client.Client;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.http.HttpServerTransport;
@ -61,7 +62,7 @@ public class PkiWithoutClientAuthenticationTests extends ShieldIntegTestCase {
public Settings nodeSettings(int nodeOrdinal) {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.put(ShieldNettyTransport.TRANSPORT_CLIENT_AUTH_SETTING, false)
.put(ShieldNettyHttpServerTransport.HTTP_SSL_SETTING, true)
.put(ShieldNettyHttpServerTransport.HTTP_CLIENT_AUTH_SETTING, randomFrom(SSLClientAuth.NO.name(), false, "false", "FALSE", SSLClientAuth.NO.name().toLowerCase(Locale.ROOT)))

View File

@ -8,6 +8,7 @@ package org.elasticsearch.shield.authc.pki;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.elasticsearch.client.Client;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.http.HttpServerTransport;
import org.elasticsearch.node.Node;
@ -32,7 +33,7 @@ public class PkiWithoutSSLTests extends ShieldIntegTestCase {
public Settings nodeSettings(int nodeOrdinal) {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.put("shield.authc.realms.pki1.type", "pki")
.put("shield.authc.realms.pki1.order", "0")
.build();

View File

@ -5,6 +5,7 @@
*/
package org.elasticsearch.shield.rest.action;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.node.Node;
import org.elasticsearch.shield.authc.support.SecuredString;
@ -34,7 +35,7 @@ public class RestAuthenticateActionTests extends ShieldIntegTestCase {
protected Settings nodeSettings(int nodeOrdinal) {
Settings.Builder builder = Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true);
.put(NetworkModule.HTTP_ENABLED.getKey(), true);
if (anonymousEnabled) {
builder.put("shield.authc.anonymous.username", "anon")

View File

@ -7,6 +7,7 @@ package org.elasticsearch.shield.transport;
import org.elasticsearch.Version;
import org.elasticsearch.common.network.NetworkAddress;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.common.transport.TransportAddress;
@ -98,7 +99,7 @@ public class ServerTransportFilterIntegrationTests extends ShieldIntegTestCase {
.put("shield.transport.ssl", sslTransportEnabled())
.put("shield.audit.enabled", false)
.put("path.home", createTempDir())
.put(Node.HTTP_ENABLED, false)
.put(NetworkModule.HTTP_ENABLED.getKey(), false)
.put(InternalCryptoService.FILE_SETTING, systemKeyFile)
.put("node.client", true)
.build();
@ -130,7 +131,7 @@ public class ServerTransportFilterIntegrationTests extends ShieldIntegTestCase {
.put("discovery.zen.ping.unicast.hosts", "localhost:" + randomClientPort)
.put("shield.transport.ssl", sslTransportEnabled())
.put("shield.audit.enabled", false)
.put(Node.HTTP_ENABLED, false)
.put(NetworkModule.HTTP_ENABLED.getKey(), false)
.put(InternalCryptoService.FILE_SETTING, systemKeyFile)
.put("discovery.initial_state_timeout", "2s")
.put("path.home", createTempDir())

View File

@ -6,6 +6,7 @@
package org.elasticsearch.shield.transport.filter;
import org.elasticsearch.client.Client;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.common.transport.TransportAddress;
@ -41,7 +42,7 @@ public class IpFilteringIntegrationTests extends ShieldIntegTestCase {
protected Settings nodeSettings(int nodeOrdinal) {
String randomClientPortRange = randomClientPort + "-" + (randomClientPort+100);
return Settings.builder().put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.put("transport.profiles.client.port", randomClientPortRange)
.put("transport.profiles.client.bind_host", "localhost") // make sure this is "localhost", no matter if ipv4 or ipv6, but be consistent
.put("transport.profiles.client.shield.filter.deny", "_all")

View File

@ -6,6 +6,7 @@
package org.elasticsearch.shield.transport.filter;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.node.Node;
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
@ -38,7 +39,7 @@ public class IpFilteringUpdateTests extends ShieldIntegTestCase {
String randomClientPortRange = randomClientPort + "-" + (randomClientPort+100);
return settingsBuilder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, httpEnabled)
.put(NetworkModule.HTTP_ENABLED.getKey(), httpEnabled)
.put("shield.transport.filter.deny", "127.0.0.200")
.put("transport.profiles.client.port", randomClientPortRange)
.build();

View File

@ -11,6 +11,7 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.TransportAddress;
import org.elasticsearch.http.HttpServerTransport;
@ -43,7 +44,7 @@ public class SslClientAuthTests extends ShieldIntegTestCase {
.put(ShieldNettyHttpServerTransport.HTTP_SSL_SETTING, true)
.put(ShieldNettyHttpServerTransport.HTTP_CLIENT_AUTH_SETTING, true)
.put("transport.profiles.default.shield.ssl.client.auth", false)
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.build();
}

View File

@ -17,6 +17,7 @@ import org.apache.http.impl.client.HttpClients;
import org.elasticsearch.client.transport.NoNodeAvailableException;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.io.Streams;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.common.transport.TransportAddress;
@ -46,7 +47,7 @@ public class SslIntegrationTests extends ShieldIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
return settingsBuilder().put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.put(ShieldNettyHttpServerTransport.HTTP_SSL_SETTING, true).build();
}

View File

@ -10,6 +10,7 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.elasticsearch.action.admin.cluster.node.info.NodeInfo;
import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.http.HttpServerTransport;
import org.elasticsearch.node.Node;
@ -42,7 +43,7 @@ public class WatcherPluginDisableTests extends ESIntegTestCase {
.put(super.nodeSettings(nodeOrdinal))
.put(WatcherPlugin.ENABLED_SETTING, false)
.put(ShieldPlugin.ENABLED_SETTING_NAME, false) // disable shield because of query cache check and authentication/authorization
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.build();
}

View File

@ -6,6 +6,7 @@
package org.elasticsearch.watcher.input.chain;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.IndexNotFoundException;
import org.elasticsearch.node.Node;
@ -35,7 +36,7 @@ public class ChainIntegrationTests extends AbstractWatcherIntegrationTestCase {
protected Settings nodeSettings(int nodeOrdinal) {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.build();
}

View File

@ -7,6 +7,7 @@ package org.elasticsearch.watcher.input.http;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.support.IndicesOptions;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.node.Node;
@ -42,7 +43,7 @@ public class HttpInputIntegrationTests extends AbstractWatcherIntegrationTestCas
protected Settings nodeSettings(int nodeOrdinal) {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.build();
}

View File

@ -7,6 +7,7 @@ package org.elasticsearch.watcher.test.integration;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.json.JsonXContent;
import org.elasticsearch.common.xcontent.support.XContentMapValues;
@ -43,7 +44,7 @@ public class WatcherSettingsFilterTests extends AbstractWatcherIntegrationTestCa
protected Settings nodeSettings(int nodeOrdinal) {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
.put("watcher.actions.email.service.account._email.smtp.host", "host.domain")
.put("watcher.actions.email.service.account._email.smtp.port", 587)
.put("watcher.actions.email.service.account._email.smtp.user", "_user")