alopresto commented on a change in pull request #4062: NIFI-7030 Add Kerberos
principal and password properties to Solr proc…
URL: https://github.com/apache/nifi/pull/4062#discussion_r381677000
##########
File path:
nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/java/org/apache/nifi/processors/solr/TestPutSolrContentStream.java
##########
@@ -459,6 +460,67 @@ public void testBasicAuthAndKerberosNotAllowedTogether()
throws IOException, Ini
Assert.assertEquals(keytab,
((KerberosKeytabUser)kerberosUser).getKeytabFile());
}
+ @Test
+ public void testBasicAuthAndKerberosPrincipalPasswordNotAllowedTogether()
throws IOException, InitializationException {
+ final SolrClient solrClient =
createEmbeddedSolrClient(DEFAULT_SOLR_CORE);
+ final TestableProcessor proc = new TestableProcessor(solrClient);
+ final TestRunner runner = createDefaultTestRunner(proc);
+ runner.assertValid();
+
+ runner.setProperty(SolrUtils.BASIC_USERNAME, "user1");
+ runner.setProperty(SolrUtils.BASIC_PASSWORD, "password");
+ runner.assertValid();
+
+ final String kerberosPrincipal = "[email protected]";
+ final String kerberosPassword = "nifi";
+ runner.setProperty(SolrUtils.KERBEROS_PRINCIPAL, kerberosPrincipal);
+ runner.setProperty(SolrUtils.KERBEROS_PASSWORD, kerberosPassword);
+
+ runner.assertNotValid();
+
+ runner.removeProperty(SolrUtils.BASIC_USERNAME);
+ runner.removeProperty(SolrUtils.BASIC_PASSWORD);
+ runner.assertValid();
+
+ proc.onScheduled(runner.getProcessContext());
+ final KerberosUser kerberosUser = proc.getMockKerberosKeytabUser();;
Review comment:
Double `;` typo.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services