Merge branch 'stable-2.14' into stable-2.15
* stable-2.14: Revert "ElasticContainer: Limit heap usage for test containers" config-gerrit: Mention that Elasticsearch must be reachable during init ElasticContainer: Limit heap usage for test containers config-gerrit: Move elasticsearch security settings to separate section Elasticsearch: Allow to omit the elasticsearch.username Test coverage for elasticsearch.username and elasticsearch.password Fix creation of plugin log file when log4j.configuration is set Change-Id: I448b583d33794834aae5e69f48e50aff04baa1df
This commit is contained in:
@@ -45,7 +45,7 @@ public class ElasticContainer<SELF extends ElasticContainer<SELF>> extends Gener
|
||||
case V2_4:
|
||||
return "elasticsearch:2.4.6-alpine";
|
||||
case V5_6:
|
||||
return "elasticsearch:5.6.10-alpine";
|
||||
return "docker.elastic.co/elasticsearch/elasticsearch:5.6.10";
|
||||
case V6_2:
|
||||
return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.4";
|
||||
case V6_3:
|
||||
|
@@ -32,13 +32,20 @@ public final class ElasticTestUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static void configure(Config config, int port, String prefix) {
|
||||
public static void configure(Config config, int port, String prefix, String password) {
|
||||
config.setEnum("index", null, "type", IndexType.ELASTICSEARCH);
|
||||
config.setString("elasticsearch", "test", "protocol", "http");
|
||||
config.setString("elasticsearch", "test", "hostname", "localhost");
|
||||
config.setInt("elasticsearch", "test", "port", port);
|
||||
config.setString("elasticsearch", null, "prefix", prefix);
|
||||
config.setInt("index", null, "maxLimit", 10000);
|
||||
if (password != null) {
|
||||
config.setString("elasticsearch", null, "password", password);
|
||||
}
|
||||
}
|
||||
|
||||
public static void configure(Config config, int port, String prefix) {
|
||||
configure(config, port, prefix, null);
|
||||
}
|
||||
|
||||
public static void createAllIndexes(Injector injector) throws IOException {
|
||||
|
@@ -60,7 +60,7 @@ public class ElasticV5QueryAccountsTest extends AbstractQueryAccountsTest {
|
||||
Config elasticsearchConfig = new Config(config);
|
||||
InMemoryModule.setDefaults(elasticsearchConfig);
|
||||
String indicesPrefix = testName();
|
||||
ElasticTestUtils.configure(elasticsearchConfig, nodeInfo.port, indicesPrefix);
|
||||
ElasticTestUtils.configure(elasticsearchConfig, nodeInfo.port, indicesPrefix, "changeme");
|
||||
return Guice.createInjector(new InMemoryModule(elasticsearchConfig, notesMigration));
|
||||
}
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ public class ElasticV5QueryChangesTest extends AbstractQueryChangesTest {
|
||||
Config elasticsearchConfig = new Config(config);
|
||||
InMemoryModule.setDefaults(elasticsearchConfig);
|
||||
String indicesPrefix = testName();
|
||||
ElasticTestUtils.configure(elasticsearchConfig, nodeInfo.port, indicesPrefix);
|
||||
ElasticTestUtils.configure(elasticsearchConfig, nodeInfo.port, indicesPrefix, "changeme");
|
||||
return Guice.createInjector(new InMemoryModule(elasticsearchConfig, notesMigration));
|
||||
}
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ public class ElasticV5QueryGroupsTest extends AbstractQueryGroupsTest {
|
||||
Config elasticsearchConfig = new Config(config);
|
||||
InMemoryModule.setDefaults(elasticsearchConfig);
|
||||
String indicesPrefix = testName();
|
||||
ElasticTestUtils.configure(elasticsearchConfig, nodeInfo.port, indicesPrefix);
|
||||
ElasticTestUtils.configure(elasticsearchConfig, nodeInfo.port, indicesPrefix, "changeme");
|
||||
return Guice.createInjector(new InMemoryModule(elasticsearchConfig, notesMigration));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user