summaryrefslogtreecommitdiffstats
path: root/datarouter-node
diff options
context:
space:
mode:
authoregernug <gerard.nugent@est.tech>2019-07-25 16:18:31 +0000
committeregernug <gerard.nugent@est.tech>2019-07-25 16:18:31 +0000
commit8ebd052e0b1066c432f5dba6ef69599eaf5ec27e (patch)
treec4248eb9b5aad40a49bb71af3fb47c2a8a1a1535 /datarouter-node
parentb10c179229cea56e36a2fb9b6f2c17baf0d83f13 (diff)
Removing clumsy code smells and adding missing JettyFilter test
Change-Id: I1679f4a5656ab9d34ad247d3edc7eb39821cf769 Issue-ID: DMAAP-1195 Signed-off-by: egernug <gerard.nugent@est.tech>
Diffstat (limited to 'datarouter-node')
-rw-r--r--datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/LogbackFilterTest.java12
1 files changed, 11 insertions, 1 deletions
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();