Search in sources :

Example 1 with ElasticSearchAuditDestination

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()));
}
Also used : ElasticSearchAuditDestination(org.apache.ranger.audit.destination.ElasticSearchAuditDestination) Properties(java.util.Properties) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

Properties (java.util.Properties)1 ElasticSearchAuditDestination (org.apache.ranger.audit.destination.ElasticSearchAuditDestination)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1