use of org.apache.ranger.audit.destination.ElasticSearchAuditDestination in project ranger by apache.
the class ElasticSearchAccessAuditsServiceTest method testWrite.
@Test
// For manual execution only
@Ignore
public void testWrite() {
ElasticSearchAuditDestination elasticSearchAuditDestination = new ElasticSearchAuditDestination();
Properties properties = new Properties();
properties.put(CONFIG_PREFIX + "." + ElasticSearchAuditDestination.CONFIG_URLS, "localhost");
properties.put(CONFIG_PREFIX + "." + ElasticSearchAuditDestination.CONFIG_USER, "elastic");
properties.put(CONFIG_PREFIX + "." + ElasticSearchAuditDestination.CONFIG_PWRD, "password1");
elasticSearchAuditDestination.init(properties, CONFIG_PREFIX);
assert elasticSearchAuditDestination.log(Arrays.asList(getAuthzAuditEvent()));
}
Aggregations