alopresto commented on a change in pull request #3340: NIFI-6026 - First commit which adds a new tls-toolkit mode called Key… URL: https://github.com/apache/nifi/pull/3340#discussion_r273283033
########## File path: nifi-toolkit/nifi-toolkit-tls/src/test/java/org/apache/nifi/toolkit/tls/util/TlsHelperTest.java ########## @@ -448,4 +460,58 @@ public void testClientDnFilenameSpecialChars() throws Exception { assertEquals("CN=testuser_OU=NiFi_Organisation", escapedClientDn); } + private KeyStore setupKeystore() throws Exception { + + KeyStore ks = KeyStore.getInstance("JKS"); + InputStream readStream = getClass().getClassLoader().getResourceAsStream("keystore.jks"); + ks.load(readStream, "changeit".toCharArray()); + + return ks; + } + + @Test + public void testOutputCertsAsPem() throws Exception { Review comment: I'd prefer if these tests were more descriptive -- list the expectations for what is happening here. The keystore should have a known number of entries, and that number should match the number of outputs. In addition, the key signature should be compared with that queried from the keystore directly, not just asserted that it is non-null. The same goes for the key assertions in the subsequent test. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services