mosermw commented on code in PR #10546:
URL: https://github.com/apache/nifi/pull/10546#discussion_r2542757304


##########
nifi-extension-bundles/nifi-enrich-bundle/nifi-enrich-processors/src/test/java/org/apache/nifi/processors/TestGeoEnrichIPRecord.java:
##########
@@ -90,7 +94,28 @@ public void setup() throws Exception {
         runner.enableControllerService(registry);
         runner.enableControllerService(reader);
         runner.enableControllerService(writer);
+    }
+
+    @ParameterizedTest
+    @MethodSource("logLevelArgs")
+    void testInvalidLogLevel(String logLevel, boolean expectValid) {
+        runner.setProperty(AbstractEnrichIP.LOG_LEVEL, logLevel);
+
+        if (expectValid) {
+            runner.assertValid();
+        } else {
+            runner.assertNotValid();
+        }
+    }
 
+    private static Stream<Arguments> logLevelArgs() {
+        return Stream.of(
+                Arguments.argumentSet("Invalid Log Level Specified", 
"GIBBERISH", false),
+                Arguments.argumentSet("Log Level Specified as Expression 
Language Expression", "${log.level}", true)
+        );
+    }

Review Comment:
   Yes.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to