use of org.graylog2.indexer.IndexMappingFactory in project graylog2-server by Graylog2.
the class IndicesIT method createThrowingIndexMappingFactory.
private IndexMappingFactory createThrowingIndexMappingFactory(IndexSetConfig indexSetConfig) {
final IndexMappingFactory indexMappingFactory = mock(IndexMappingFactory.class);
when(indexMappingFactory.createIndexMapping(any())).thenThrow(new IgnoreIndexTemplate(true, "Reason", indexSetConfig.indexPrefix(), indexSetConfig.indexTemplateName(), indexSetConfig.indexTemplateType().orElse(null)));
return indexMappingFactory;
}
use of org.graylog2.indexer.IndexMappingFactory in project graylog2-server by Graylog2.
the class IndicesGetAllMessageFieldsIT method setUp.
@Before
public void setUp() throws Exception {
final Node node = new Node(mock(NodeAdapter.class));
// noinspection UnstableApiUsage
indices = new Indices(new IndexMappingFactory(node, ImmutableMap.of(MESSAGE_TEMPLATE_TYPE, new MessageIndexTemplateProvider())), mock(NodeId.class), new NullAuditEventSender(), new EventBus(), indicesAdapter());
}
use of org.graylog2.indexer.IndexMappingFactory in project graylog2-server by Graylog2.
the class IndexFieldTypePollerIT method setUp.
@Before
public void setUp() throws Exception {
final Node node = mock(Node.class);
@SuppressWarnings("UnstableApiUsage") final Indices indices = new Indices(new IndexMappingFactory(node, ImmutableMap.of(MESSAGE_TEMPLATE_TYPE, new MessageIndexTemplateProvider())), mock(NodeId.class), new NullAuditEventSender(), mock(EventBus.class), createIndicesAdapter());
poller = new IndexFieldTypePoller(indices, new MetricRegistry(), createIndexFieldTypePollerAdapter());
indexSet = new TestIndexSet(indexSetConfig);
importFixture("org/graylog2/indexer/fieldtypes/IndexFieldTypePollerIT.json");
}
use of org.graylog2.indexer.IndexMappingFactory in project graylog2-server by Graylog2.
the class IndicesIT method setUp.
@BeforeEach
public void setUp() {
// noinspection UnstableApiUsage
eventBus = new EventBus("indices-test");
final Node node = new Node(createNodeAdapter());
final IndexMappingFactory indexMappingFactory = new IndexMappingFactory(node, ImmutableMap.of(MessageIndexTemplateProvider.MESSAGE_TEMPLATE_TYPE, new MessageIndexTemplateProvider()));
indices = new Indices(indexMappingFactory, mock(NodeId.class), new NullAuditEventSender(), eventBus, indicesAdapter());
}
Aggregations