Merge remote-tracking branch 'elastic/master' into feature/sql

Original commit: elastic/x-pack-elasticsearch@a113c54b94
This commit is contained in:
Igor Motov 2017-12-09 12:21:07 -05:00
commit 018d4d7722
19 changed files with 30 additions and 61 deletions

View File

@ -51,7 +51,7 @@ subprojects {
additionalLicense 'ESCON', 'Elasticsearch Confidential', 'ELASTICSEARCH CONFIDENTIAL'
}
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-api:${version}": ':x-pack-elasticsearch:plugin']
ext.projectSubstitutions += [ "org.elasticsearch:x-pack-common:${version}": ':x-pack-elasticsearch:plugin:common']
ext.projectSubstitutions += [ "org.elasticsearch:x-pack-core:${version}": ':x-pack-elasticsearch:plugin:x-pack-core']
for (final Version version : versionCollection.versionsIndexCompatibleWithCurrent) {
if (version.branch != null) {

View File

@ -9,11 +9,11 @@ licenseHeaders.enabled = false
dependencies {
provided "org.elasticsearch:elasticsearch:${version}"
compile "org.elasticsearch:x-pack-common:${version}"
compile "org.elasticsearch:x-pack-core:${version}"
}
dependencyLicenses {
ignoreSha 'x-pack-common'
ignoreSha 'x-pack-core'
}
parent.bundlePlugin {

View File

@ -7,21 +7,21 @@ test.enabled=false
licenseHeaders.enabled = false
configurations {
nativeBundle {
resolutionStrategy.dependencySubstitution {
if (findProject(':machine-learning-cpp') != null) {
substitute module("org.elasticsearch.ml:ml-cpp") with project(":machine-learning-cpp")
} else {
substitute module("org.elasticsearch.ml:ml-cpp") with project("${project.path}:ml-cpp-snapshot")
}
nativeBundle {
resolutionStrategy.dependencySubstitution {
if (findProject(':machine-learning-cpp') != null) {
substitute module("org.elasticsearch.ml:ml-cpp") with project(":machine-learning-cpp")
} else {
substitute module("org.elasticsearch.ml:ml-cpp") with project("${project.path}:ml-cpp-snapshot")
}
}
}
}
}
dependencies {
provided "org.elasticsearch:elasticsearch:${version}"
compile "org.elasticsearch:x-pack-common:${version}"
compile "org.elasticsearch:x-pack-core:${version}"
// ml deps
compile 'net.sf.supercsv:super-csv:2.4.0'
@ -30,7 +30,7 @@ dependencies {
}
dependencyLicenses {
ignoreSha 'x-pack-common'
ignoreSha 'x-pack-core'
}
parent.bundlePlugin {

View File

@ -12,7 +12,7 @@ licenseHeaders.enabled = false
dependencies {
provided "org.elasticsearch:elasticsearch:${version}"
compile "org.elasticsearch:x-pack-common:${version}"
compile "org.elasticsearch:x-pack-core:${version}"
// monitoring deps
compile "org.elasticsearch.client:elasticsearch-rest-client:${version}"
@ -20,13 +20,13 @@ dependencies {
}
dependencyLicenses {
mapping from: /elasticsearch-rest-client.*/, to: 'elasticsearch'
mapping from: /http.*/, to: 'httpclient' // pulled in by rest client
mapping from: /commons-.*/, to: 'commons' // pulled in by rest client
ignoreSha 'x-pack-common'
ignoreSha 'elasticsearch-rest-client'
ignoreSha 'transport-netty4'
ignoreSha 'elasticsearch-rest-client-sniffer'
mapping from: /elasticsearch-rest-client.*/, to: 'elasticsearch'
mapping from: /http.*/, to: 'httpclient' // pulled in by rest client
mapping from: /commons-.*/, to: 'commons' // pulled in by rest client
ignoreSha 'x-pack-core'
ignoreSha 'elasticsearch-rest-client'
ignoreSha 'transport-netty4'
ignoreSha 'elasticsearch-rest-client-sniffer'
}
parent.bundlePlugin {

View File

@ -9,7 +9,7 @@ licenseHeaders.enabled = false
dependencies {
provided "org.elasticsearch:elasticsearch:${version}"
compile "org.elasticsearch:x-pack-common:${version}"
compile "org.elasticsearch:x-pack-core:${version}"
// security deps
compile project(path: ':modules:transport-netty4', configuration: 'runtime')
compile 'com.unboundid:unboundid-ldapsdk:3.2.0'
@ -19,11 +19,11 @@ dependencies {
}
dependencyLicenses {
mapping from: /netty-.*/, to: 'netty'
mapping from: /bc.*/, to: 'bouncycastle'
mapping from: /transport-netty.*/, to: 'elasticsearch'
ignoreSha 'x-pack-common'
ignoreSha 'transport-netty4'
mapping from: /netty-.*/, to: 'netty'
mapping from: /bc.*/, to: 'bouncycastle'
mapping from: /transport-netty.*/, to: 'elasticsearch'
ignoreSha 'x-pack-core'
ignoreSha 'transport-netty4'
}
parent.bundlePlugin {

View File

@ -1,21 +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;
* you may not use this file except in compliance with the Elastic License.
*/
package org.elasticsearch.transport.netty4;
import static org.mockito.Mockito.mock;
/** Allows setting a mock into Netty3Transport */
public class Netty4MockUtil {
/**
* We don't really need to start Netty for these tests, but we can't create a pipeline
* with a null handler. So we set it to a mock for tests.
*/
public static void setOpenChannelsHandlerToMock(Netty4Transport transport) throws Exception {
transport.serverOpenChannels = mock(Netty4OpenChannelsHandler.class);
}
}

View File

@ -18,7 +18,6 @@ import org.elasticsearch.env.TestEnvironment;
import org.elasticsearch.indices.breaker.CircuitBreakerService;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.netty4.Netty4MockUtil;
import org.elasticsearch.xpack.ssl.SSLClientAuth;
import org.elasticsearch.xpack.ssl.SSLService;
import org.junit.Before;
@ -75,7 +74,6 @@ public class SecurityNetty4TransportTests extends ESTestCase {
public void testThatProfileTakesDefaultSSLSetting() throws Exception {
SecurityNetty4Transport transport = createTransport();
Netty4MockUtil.setOpenChannelsHandlerToMock(transport);
ChannelHandler handler = transport.getServerChannelInitializer("default");
final EmbeddedChannel ch = new EmbeddedChannel(handler);
assertThat(ch.pipeline().get(SslHandler.class).engine(), notNullValue());
@ -83,7 +81,6 @@ public class SecurityNetty4TransportTests extends ESTestCase {
public void testDefaultClientAuth() throws Exception {
SecurityNetty4Transport transport = createTransport();
Netty4MockUtil.setOpenChannelsHandlerToMock(transport);
ChannelHandler handler = transport.getServerChannelInitializer("default");
final EmbeddedChannel ch = new EmbeddedChannel(handler);
assertThat(ch.pipeline().get(SslHandler.class).engine().getNeedClientAuth(), is(true));
@ -98,7 +95,6 @@ public class SecurityNetty4TransportTests extends ESTestCase {
.build();
sslService = new SSLService(settings, env);
SecurityNetty4Transport transport = createTransport(settings);
Netty4MockUtil.setOpenChannelsHandlerToMock(transport);
ChannelHandler handler = transport.getServerChannelInitializer("default");
final EmbeddedChannel ch = new EmbeddedChannel(handler);
assertThat(ch.pipeline().get(SslHandler.class).engine().getNeedClientAuth(), is(true));
@ -113,7 +109,6 @@ public class SecurityNetty4TransportTests extends ESTestCase {
.build();
sslService = new SSLService(settings, env);
SecurityNetty4Transport transport = createTransport(settings);
Netty4MockUtil.setOpenChannelsHandlerToMock(transport);
ChannelHandler handler = transport.getServerChannelInitializer("default");
final EmbeddedChannel ch = new EmbeddedChannel(handler);
assertThat(ch.pipeline().get(SslHandler.class).engine().getNeedClientAuth(), is(false));
@ -128,7 +123,6 @@ public class SecurityNetty4TransportTests extends ESTestCase {
.build();
sslService = new SSLService(settings, env);
SecurityNetty4Transport transport = createTransport(settings);
Netty4MockUtil.setOpenChannelsHandlerToMock(transport);
ChannelHandler handler = transport.getServerChannelInitializer("default");
final EmbeddedChannel ch = new EmbeddedChannel(handler);
assertThat(ch.pipeline().get(SslHandler.class).engine().getNeedClientAuth(), is(false));
@ -144,7 +138,6 @@ public class SecurityNetty4TransportTests extends ESTestCase {
.build();
sslService = new SSLService(settings, env);
SecurityNetty4Transport transport = createTransport(settings);
Netty4MockUtil.setOpenChannelsHandlerToMock(transport);
ChannelHandler handler = transport.getServerChannelInitializer("client");
final EmbeddedChannel ch = new EmbeddedChannel(handler);
assertThat(ch.pipeline().get(SslHandler.class).engine().getNeedClientAuth(), is(true));
@ -160,7 +153,6 @@ public class SecurityNetty4TransportTests extends ESTestCase {
.build();
sslService = new SSLService(settings, env);
SecurityNetty4Transport transport = createTransport(settings);
Netty4MockUtil.setOpenChannelsHandlerToMock(transport);
ChannelHandler handler = transport.getServerChannelInitializer("client");
final EmbeddedChannel ch = new EmbeddedChannel(handler);
assertThat(ch.pipeline().get(SslHandler.class).engine().getNeedClientAuth(), is(false));
@ -176,7 +168,6 @@ public class SecurityNetty4TransportTests extends ESTestCase {
.build();
sslService = new SSLService(settings, env);
SecurityNetty4Transport transport = createTransport(settings);
Netty4MockUtil.setOpenChannelsHandlerToMock(transport);
final ChannelHandler handler = transport.getServerChannelInitializer("client");
final EmbeddedChannel ch = new EmbeddedChannel(handler);
assertThat(ch.pipeline().get(SslHandler.class).engine().getNeedClientAuth(), is(false));
@ -200,7 +191,6 @@ public class SecurityNetty4TransportTests extends ESTestCase {
env = TestEnvironment.newEnvironment(settings);
sslService = new SSLService(settings, env);
SecurityNetty4Transport transport = createTransport(settings);
Netty4MockUtil.setOpenChannelsHandlerToMock(transport);
final ChannelHandler handler = transport.getServerChannelInitializer("default");
final EmbeddedChannel ch = new EmbeddedChannel(handler);
final SSLEngine engine = ch.pipeline().get(SslHandler.class).engine();

View File

@ -8,13 +8,13 @@ licenseHeaders.enabled = false
dependencyLicenses {
mapping from: /owasp-java-html-sanitizer.*/, to: 'owasp-java-html-sanitizer'
ignoreSha 'x-pack-common'
ignoreSha 'x-pack-core'
}
dependencies {
provided "org.elasticsearch:elasticsearch:${version}"
compile "org.elasticsearch:x-pack-common:${version}"
compile "org.elasticsearch:x-pack-core:${version}"
// watcher deps
compile 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:r239'

View File

@ -4,7 +4,7 @@ dependencies {
provided "org.elasticsearch:elasticsearch:${version}"
}
archivesBaseName = 'x-pack-common'
archivesBaseName = 'x-pack-core'
// TODO: enable this once we have tests
test.enabled=false