use of org.graylog2.audit.NullAuditEventSender in project graylog2-server by Graylog2.
the class IndicesGetAllMessageFieldsTest method setUp.
@Before
public void setUp() throws Exception {
elasticsearchRule.getDatabaseOperation().deleteAll();
indices = new Indices(client, new IndexMapping(), new Messages(client, new MetricRegistry()), mock(NodeId.class), new NullAuditEventSender());
}
use of org.graylog2.audit.NullAuditEventSender in project graylog2-server by Graylog2.
the class IndexCreatingDatabaseOperation method insert.
@Override
public void insert(InputStream dataScript) {
waitForGreenStatus();
final IndicesAdminClient indicesAdminClient = client.admin().indices();
for (String index : indexes) {
final IndicesExistsResponse indicesExistsResponse = indicesAdminClient.prepareExists(index).execute().actionGet();
if (indicesExistsResponse.isExists()) {
client.admin().indices().prepareDelete(index).execute().actionGet();
}
final Messages messages = new Messages(client, new MetricRegistry());
final Indices indices = new Indices(client, new IndexMapping(), messages, mock(NodeId.class), new NullAuditEventSender());
if (!indices.create(index, indexSet)) {
throw new IllegalStateException("Couldn't create index " + index);
}
}
databaseOperation.insert(dataScript);
}
use of org.graylog2.audit.NullAuditEventSender in project graylog2-server by Graylog2.
the class KafkaJournalTest 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(UUID.randomUUID().toString(), nodeId, StandardCharsets.UTF_8);
final Configuration configuration = new Configuration() {
@Override
public String getNodeIdFile() {
return nodeId.getAbsolutePath();
}
};
serverStatus = new ServerStatus(configuration, EnumSet.of(ServerStatus.Capability.MASTER), new EventBus("KafkaJournalTest"), NullAuditEventSender::new);
}
use of org.graylog2.audit.NullAuditEventSender 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.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);
}
Aggregations