dan-s1 commented on code in PR #10546:
URL: https://github.com/apache/nifi/pull/10546#discussion_r2542671343
##########
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:
@mosermw There is a third case I could add and that is a valid log level
case. Would you be okay with that?
--
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]