pvillard31 commented on code in PR #10278:
URL: https://github.com/apache/nifi/pull/10278#discussion_r2332714479


##########
nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-shared/src/test/java/org/apache/nifi/kafka/shared/login/AwsMskIamLoginConfigProviderTest.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.kafka.shared.login;
+
+import org.apache.nifi.context.PropertyContext;
+import org.apache.nifi.kafka.shared.component.KafkaClientComponent;
+import org.apache.nifi.kafka.shared.property.SaslMechanism;
+import org.apache.nifi.util.NoOpProcessor;
+import org.apache.nifi.util.TestRunner;
+import org.apache.nifi.util.TestRunners;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+class AwsMskIamLoginConfigProviderTest {
+
+    private static final String IAM_LOGIN_MODULE = 
"software.amazon.msk.auth.iam.IAMLoginModule";
+
+    private TestRunner runner;
+    private AwsMskIamLoginConfigProvider provider;
+
+    @BeforeEach
+    void setUp() {
+        runner = TestRunners.newTestRunner(NoOpProcessor.class);
+        runner.setValidateExpressionUsage(false);

Review Comment:
   It's required because of `AWS_PROFILE_NAME` property that is defined with 
`.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)` and 
we do evaluate expression language on this property in 
`AwsMskIamLoginConfigProvider`. But due to how/where the property is defined 
and visible to the test framework, we have an error and we need to set this 
flag to false.
   
   My feeling is that we should not allow for expression language support in 
the first place for this. So I'll push a commit in that direction and you can 
let me know what you think.



-- 
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