Test coverage for elasticsearch.username and elasticsearch.password

Switch to the regular (i.e. not "-oss") image for version 5.6 [1] which
includes X-Pack Security [2] by default.

Modify the configuration used by the 5.6 tests to set the password to
the default "changeme" value.

[1] https://www.elastic.co/guide/en/elasticsearch/reference/5.6/docker.html
[2] https://www.elastic.co/guide/en/x-pack/5.6/security-getting-started.html

Bug: Issue 9095
Change-Id: I5c4adc86330635fd861749f0e460a8d3eb3a51a6
This commit is contained in:
David Pursehouse
2018-07-02 13:40:56 +09:00
parent 97634bf404
commit e4dd675529
7 changed files with 17 additions and 7 deletions

View File

@@ -62,7 +62,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));
}
}

View File

@@ -62,7 +62,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));
}
}

View File

@@ -62,7 +62,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));
}
}