Search in sources :

Example 6 with NullAuditEventSender

use of org.graylog2.audit.NullAuditEventSender in project graylog2-server by Graylog2.

the class MongoIndexRangeServiceTest method setUp.

@Before
public void setUp() throws Exception {
    localEventBus = new EventBus("local-event-bus");
    indexRangeService = new MongoIndexRangeService(mongodb.mongoConnection(), objectMapperProvider, indices, indexSetRegistry, new NullAuditEventSender(), mock(NodeId.class), localEventBus);
}
Also used : NullAuditEventSender(org.graylog2.audit.NullAuditEventSender) EventBus(com.google.common.eventbus.EventBus) Before(org.junit.Before)

Example 7 with NullAuditEventSender

use of org.graylog2.audit.NullAuditEventSender in project graylog2-server by Graylog2.

the class LocalKafkaJournalTest method setUp.

@Before
public void setUp() throws IOException {
    scheduler = new ScheduledThreadPoolExecutor(1);
    scheduler.prestartCoreThread();
    journalDirectory = temporaryFolder.newFolder();
    final File nodeId = temporaryFolder.newFile("node-id");
    Files.write(nodeId.toPath(), UUID.randomUUID().toString().getBytes(StandardCharsets.UTF_8));
    final Configuration configuration = new Configuration() {

        @Override
        public String getNodeIdFile() {
            return nodeId.getAbsolutePath();
        }
    };
    serverStatus = new ServerStatus(configuration, EnumSet.of(ServerStatus.Capability.SERVER), new EventBus("KafkaJournalTest"), NullAuditEventSender::new);
}
Also used : Configuration(org.graylog2.Configuration) ScheduledThreadPoolExecutor(java.util.concurrent.ScheduledThreadPoolExecutor) ServerStatus(org.graylog2.plugin.ServerStatus) EventBus(com.google.common.eventbus.EventBus) File(java.io.File) Before(org.junit.Before)

Example 8 with NullAuditEventSender

use of org.graylog2.audit.NullAuditEventSender 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");
}
Also used : NullAuditEventSender(org.graylog2.audit.NullAuditEventSender) TestIndexSet(org.graylog2.indexer.TestIndexSet) IndexMappingFactory(org.graylog2.indexer.IndexMappingFactory) Node(org.graylog2.indexer.cluster.Node) MetricRegistry(com.codahale.metrics.MetricRegistry) NodeId(org.graylog2.plugin.system.NodeId) Indices(org.graylog2.indexer.indices.Indices) MessageIndexTemplateProvider(org.graylog2.indexer.MessageIndexTemplateProvider) EventBus(com.google.common.eventbus.EventBus) Before(org.junit.Before)

Aggregations

EventBus (com.google.common.eventbus.EventBus)6 NullAuditEventSender (org.graylog2.audit.NullAuditEventSender)6 Before (org.junit.Before)6 MetricRegistry (com.codahale.metrics.MetricRegistry)3 IndexMappingFactory (org.graylog2.indexer.IndexMappingFactory)3 MessageIndexTemplateProvider (org.graylog2.indexer.MessageIndexTemplateProvider)3 Node (org.graylog2.indexer.cluster.Node)3 File (java.io.File)2 ScheduledThreadPoolExecutor (java.util.concurrent.ScheduledThreadPoolExecutor)2 Configuration (org.graylog2.Configuration)2 IndexMapping (org.graylog2.indexer.IndexMapping)2 Indices (org.graylog2.indexer.indices.Indices)2 Messages (org.graylog2.indexer.messages.Messages)2 ServerStatus (org.graylog2.plugin.ServerStatus)2 NodeId (org.graylog2.plugin.system.NodeId)2 IndicesExistsResponse (org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsResponse)1 IndicesAdminClient (org.elasticsearch.client.IndicesAdminClient)1 TestIndexSet (org.graylog2.indexer.TestIndexSet)1 NodeAdapter (org.graylog2.indexer.cluster.NodeAdapter)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1