Search in sources :

Example 1 with InternalNode

use of org.elasticsearch.node.internal.InternalNode in project elasticsearch-jetty by sonian.

the class LoggingFilterHttpServerAdapterTests method testLoggingSettings.

@Test
public void testLoggingSettings() throws Exception {
    startNode("server1");
    FilterHttpServerTransport filterHttpServerTransport = (FilterHttpServerTransport) ((InternalNode) node("server1")).injector().getInstance(HttpServerTransport.class);
    LoggingFilterHttpServerAdapter logging = (LoggingFilterHttpServerAdapter) filterHttpServerTransport.filter("logging");
    assertThat(logging.requestLoggingLevelSettings().getLoggingLevel(GET, "/_bulk").logBody(), equalTo(false));
    assertThat(logging.requestLoggingLevelSettings().getLoggingLevel(GET, "/idx/_bulk").logBody(), equalTo(false));
    assertThat(logging.requestLoggingLevelSettings().getLoggingLevel(GET, "/_cluster/health").logLevel(), equalTo(TRACE));
}
Also used : InternalNode(org.elasticsearch.node.internal.InternalNode) FilterHttpServerTransport(com.sonian.elasticsearch.http.filter.FilterHttpServerTransport) HttpServerTransport(org.elasticsearch.http.HttpServerTransport) FilterHttpServerTransport(com.sonian.elasticsearch.http.filter.FilterHttpServerTransport) Test(org.testng.annotations.Test)

Aggregations

FilterHttpServerTransport (com.sonian.elasticsearch.http.filter.FilterHttpServerTransport)1 HttpServerTransport (org.elasticsearch.http.HttpServerTransport)1 InternalNode (org.elasticsearch.node.internal.InternalNode)1 Test (org.testng.annotations.Test)1