use of com.github.joschi.jadconfig.JadConfig in project graylog2-server by Graylog2.
the class ElasticsearchConfigurationTest method testGetPathHome.
@Test
public void testGetPathHome() throws ValidationException, RepositoryException {
final ElasticsearchConfiguration configuration = new ElasticsearchConfiguration();
new JadConfig(new InMemoryRepository(), configuration).process();
assertEquals(configuration.getPathHome(), "data/elasticsearch");
}
use of com.github.joschi.jadconfig.JadConfig in project graylog2-server by Graylog2.
the class ElasticsearchConfigurationTest method testGetElasticSearchIndexPrefix.
@Test
public void testGetElasticSearchIndexPrefix() throws RepositoryException, ValidationException {
ElasticsearchConfiguration configuration = new ElasticsearchConfiguration();
new JadConfig(new InMemoryRepository(), configuration).process();
assertEquals(configuration.getIndexPrefix(), "graylog");
}
use of com.github.joschi.jadconfig.JadConfig in project graylog2-server by Graylog2.
the class MongoDbConfigurationTest method testGetThreadsAllowedToBlockMultiplier.
@Test
public void testGetThreadsAllowedToBlockMultiplier() throws RepositoryException, ValidationException {
MongoDbConfiguration configuration = new MongoDbConfiguration();
new JadConfig(new InMemoryRepository(singletonMap("mongodb_threads_allowed_to_block_multiplier", "12345")), configuration).process();
assertEquals(12345, configuration.getThreadsAllowedToBlockMultiplier());
}
use of com.github.joschi.jadconfig.JadConfig in project graylog2-server by Graylog2.
the class MongoDbConfigurationTest method validateFailsIfUriIsEmpty.
@Test(expected = ValidationException.class)
public void validateFailsIfUriIsEmpty() throws RepositoryException, ValidationException {
MongoDbConfiguration configuration = new MongoDbConfiguration();
new JadConfig(new InMemoryRepository(singletonMap("mongodb_uri", "")), configuration).process();
}
use of com.github.joschi.jadconfig.JadConfig in project graylog2-server by Graylog2.
the class MongoDbConfigurationTest method testGetMaximumMongoDBConnections.
@Test
public void testGetMaximumMongoDBConnections() throws RepositoryException, ValidationException {
MongoDbConfiguration configuration = new MongoDbConfiguration();
new JadConfig(new InMemoryRepository(singletonMap("mongodb_max_connections", "12345")), configuration).process();
assertEquals(12345, configuration.getMaxConnections());
}
Aggregations