Galsza commented on code in PR #4231:
URL: https://github.com/apache/ozone/pull/4231#discussion_r1108612331
##########
hadoop-hdds/framework/src/test/java/org/apache/hadoop/hdds/security/x509/certificate/authority/TestDefaultCAServer.java:
##########
@@ -197,11 +200,14 @@ public void testRequestCertificate() throws IOException,
testCA.init(new SecurityConfig(conf),
SELF_SIGNED_CA);
- Future<X509CertificateHolder> holder = testCA.requestCertificate(csrString,
- CertificateApprover.ApprovalType.TESTING_AUTOMATIC, SCM);
+ Future<CertPath> holder = testCA.requestCertificate(
+ csrString, CertificateApprover.ApprovalType.TESTING_AUTOMATIC, SCM);
// Right now our calls are synchronous. Eventually this will have to wait.
assertTrue(holder.isDone());
- assertNotNull(holder.get());
+ //Test that the cert path returned contains the CA certificate in proper
+ // place
+ assertEquals(holder.get().getCertificates().get(1),
Review Comment:
I've added a check to assert for the CA being the signer of the resulting
certificate. I'm not sure if there is a better way of doing this, let me know
if you have a suggestion.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]