Search in sources :

Example 1 with RepositoryException

use of com.github.joschi.jadconfig.RepositoryException in project graylog2-server by Graylog2.

the class EsNodeProviderTest method setupConfig.

private ElasticsearchConfiguration setupConfig(Map<String, String> settings) {
    // required params we don't care about in this test, so we set them to dummy values for all test cases
    settings.put("retention_strategy", "delete");
    ElasticsearchConfiguration configuration = new ElasticsearchConfiguration();
    try {
        new JadConfig(new InMemoryRepository(settings), configuration).process();
    } catch (ValidationException | RepositoryException e) {
        fail(e.getMessage());
    }
    return configuration;
}
Also used : JadConfig(com.github.joschi.jadconfig.JadConfig) InMemoryRepository(com.github.joschi.jadconfig.repositories.InMemoryRepository) ValidationException(com.github.joschi.jadconfig.ValidationException) ElasticsearchConfiguration(org.graylog2.configuration.ElasticsearchConfiguration) RepositoryException(com.github.joschi.jadconfig.RepositoryException)

Aggregations

JadConfig (com.github.joschi.jadconfig.JadConfig)1 RepositoryException (com.github.joschi.jadconfig.RepositoryException)1 ValidationException (com.github.joschi.jadconfig.ValidationException)1 InMemoryRepository (com.github.joschi.jadconfig.repositories.InMemoryRepository)1 ElasticsearchConfiguration (org.graylog2.configuration.ElasticsearchConfiguration)1