From 8ebd052e0b1066c432f5dba6ef69599eaf5ec27e Mon Sep 17 00:00:00 2001 From: egernug Date: Thu, 25 Jul 2019 16:18:31 +0000 Subject: Removing clumsy code smells and adding missing JettyFilter test Change-Id: I1679f4a5656ab9d34ad247d3edc7eb39821cf769 Issue-ID: DMAAP-1195 Signed-off-by: egernug --- .../org/onap/dmaap/datarouter/node/LogbackFilterTest.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'datarouter-node/src/test/java/org/onap') diff --git a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/LogbackFilterTest.java b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/LogbackFilterTest.java index 4a5d07ad..c18528ea 100644 --- a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/LogbackFilterTest.java +++ b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/LogbackFilterTest.java @@ -83,7 +83,17 @@ public class LogbackFilterTest { } @Test - public void Given_Event_with_invalid_jetty_string_and_valid_logger_then_jetty_Filter_DENY() { + public void Given_Event_with_invalid_jetty_string_and_valid_logger_then_jetty_Filter_ACCEPT() { + final JettyFilter filter = new JettyFilter(); + filter.start(); + final LoggingEvent event = new LoggingEvent(); + event.setMessage("org.invalid.jetty"); + event.setLoggerName("org.eclipse.jetty"); + assertEquals(FilterReply.ACCEPT, filter.decide(event)); + } + + @Test + public void Given_Event_with_invalid_jetty_string_and_invalid_logger_then_jetty_Filter_DENY() { final JettyFilter filter = new JettyFilter(); filter.start(); final LoggingEvent event = new LoggingEvent(); -- cgit 1.2.3-korg