Resolved merge conflicts from additional test case for null key password.
This closes
@@ -163,7 +163,7 @@ class OkHttpReplicationClientTest extends GroovyTestCase {
}
@Test
- void testShouldUseKeystorePasswdIfKeyPasswdIsNull() {
+ void testShouldUseKeystorePasswordIfKeyPasswordIsNull() {
// Arrange
Map flowfileEncryptionProps = [
(NiFiProperties.SECURITY_TRUSTSTORE) : "./src/test/resources/conf/truststore.jks",
@@ -179,11 +179,13 @@ class OkHttpReplicationClientTest extends GroovyTestCase {
// Act
OkHttpReplicationClient client = new OkHttpReplicationClient(mockNiFiProperties)
+ logger.info("Created secure HTTPS client with TLS configured: ${client.isTLSConfigured()}")
// Assert
- assertNotNull(client.okHttpClient.sslSocketFactory)
- assertEquals(SunX509KeyManagerImpl.class, client.okHttpClient.sslSocketFactory.context.getX509KeyManager().getClass())
- assertNotNull(client.okHttpClient.sslSocketFactory.context.getX509KeyManager().credentialsMap["nifi-key"]) }
+ assert client.isTLSConfigured()
+ assert client.okHttpClient.sslSocketFactory
+ assert client.okHttpClient.sslSocketFactory.context.getX509KeyManager().credentialsMap["nifi-key"]
+ }
@Test
void testShouldFailIfKeyPasswordIsSetButKeystorePasswordIsBlank() {
