diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/CertificateClientTestImpl.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/CertificateClientTestImpl.java index 58021f30ebf8..15b6a12336dc 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/CertificateClientTestImpl.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/CertificateClientTestImpl.java @@ -53,6 +53,11 @@ public class CertificateClientTestImpl implements CertificateClient { private final X509Certificate x509Certificate; public CertificateClientTestImpl(OzoneConfiguration conf) throws Exception { + this(conf, true); + } + + public CertificateClientTestImpl(OzoneConfiguration conf, boolean rootCA) + throws Exception { securityConfig = new SecurityConfig(conf); HDDSKeyGenerator keyGen = new HDDSKeyGenerator(securityConfig.getConfiguration()); @@ -66,8 +71,10 @@ public CertificateClientTestImpl(OzoneConfiguration conf) throws Exception { .setKey(keyPair) .setSubject("localhost") .setConfiguration(config) - .setScmID("TestScmId1") - .makeCA(); + .setScmID("TestScmId1"); + if (rootCA) { + builder.makeCA(); + } X509CertificateHolder certificateHolder = null; certificateHolder = builder.build(); x509Certificate = new JcaX509CertificateConverter().getCertificate( diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestOzoneContainerWithTLS.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestOzoneContainerWithTLS.java index c5a4a9339bc4..99c38152dba0 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestOzoneContainerWithTLS.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestOzoneContainerWithTLS.java @@ -40,7 +40,6 @@ import org.apache.ozone.test.GenericTestUtils; import org.junit.Assert; import org.junit.Before; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; @@ -68,7 +67,6 @@ * Tests ozone containers via secure grpc/netty. */ @RunWith(Parameterized.class) -@Ignore("TODO:HDDS-1157") public class TestOzoneContainerWithTLS { private static final Logger LOG = LoggerFactory.getLogger( TestOzoneContainerWithTLS.class); @@ -122,7 +120,7 @@ public void setup() throws Exception { HddsConfigKeys.HDDS_BLOCK_TOKEN_EXPIRY_TIME_DEFAULT, TimeUnit.MILLISECONDS); - caClient = new CertificateClientTestImpl(conf); + caClient = new CertificateClientTestImpl(conf, false); secretManager = new OzoneBlockTokenSecretManager(new SecurityConfig(conf), expiryTime, caClient.getCertificate(). getSerialNumber().toString());