1515import software .amazon .awssdk .services .dynamodb .model .KeyType ;
1616import software .amazon .awssdk .services .dynamodb .model .ScalarAttributeType ;
1717
18- import javax .net .ssl .KeyManagerFactory ;
19- import javax .net .ssl .SSLContext ;
20- import javax .net .ssl .TrustManagerFactory ;
2118import java .io .IOException ;
2219import java .net .URI ;
2320import java .nio .file .Files ;
2926import java .security .UnrecoverableKeyException ;
3027import java .security .cert .CertificateException ;
3128
29+ import javax .net .ssl .KeyManagerFactory ;
30+ import javax .net .ssl .SSLContext ;
31+ import javax .net .ssl .TrustManagerFactory ;
32+
3233import static org .assertj .core .api .Assertions .assertThat ;
3334import static org .assertj .core .api .Assertions .assertThatThrownBy ;
3435
@@ -41,8 +42,8 @@ public class ScyllaDBContainerTest {
4142 @ Test
4243 public void testSimple () {
4344 try ( // container {
44- ScyllaDBContainer scylladb = new ScyllaDBContainer (SCYLLADB_IMAGE )
45- // }
45+ ScyllaDBContainer scylladb = new ScyllaDBContainer (SCYLLADB_IMAGE )
46+ // }
4647 ) {
4748 scylladb .start ();
4849 // session {
@@ -60,27 +61,34 @@ public void testSimple() {
6061 }
6162
6263 @ Test
63- public void testSimpleSsl () throws NoSuchAlgorithmException , KeyStoreException , IOException , CertificateException , UnrecoverableKeyException , KeyManagementException {
64+ public void testSimpleSsl ()
65+ throws NoSuchAlgorithmException , KeyStoreException , IOException , CertificateException , UnrecoverableKeyException , KeyManagementException {
6466 try (
6567 // custom_configuration {
6668 ScyllaDBContainer scylladb = new ScyllaDBContainer (SCYLLADB_IMAGE )
6769 .withConfigurationOverride ("scylla-test-ssl" )
6870 // }
6971 ) {
70-
7172 // sslContext {
7273 String testResourcesDir = getClass ().getClassLoader ().getResource ("scylla-test-ssl/" ).getPath ();
7374
7475 KeyStore keyStore = KeyStore .getInstance ("PKCS12" );
7576 keyStore .load (Files .newInputStream (Paths .get (testResourcesDir + "keystore.node0" )), "scylla" .toCharArray ());
7677
7778 KeyStore trustStore = KeyStore .getInstance ("PKCS12" );
78- trustStore .load (Files .newInputStream (Paths .get (testResourcesDir + "truststore.node0" )), "scylla" .toCharArray ());
79+ trustStore .load (
80+ Files .newInputStream (Paths .get (testResourcesDir + "truststore.node0" )),
81+ "scylla" .toCharArray ()
82+ );
7983
80- KeyManagerFactory keyManagerFactory = KeyManagerFactory .getInstance (KeyManagerFactory .getDefaultAlgorithm ());
84+ KeyManagerFactory keyManagerFactory = KeyManagerFactory .getInstance (
85+ KeyManagerFactory .getDefaultAlgorithm ()
86+ );
8187 keyManagerFactory .init (keyStore , "scylla" .toCharArray ());
8288
83- TrustManagerFactory trustManagerFactory = TrustManagerFactory .getInstance (TrustManagerFactory .getDefaultAlgorithm ());
89+ TrustManagerFactory trustManagerFactory = TrustManagerFactory .getInstance (
90+ TrustManagerFactory .getDefaultAlgorithm ()
91+ );
8492 trustManagerFactory .init (trustStore );
8593
8694 SSLContext sslContext = SSLContext .getInstance ("TLS" );
@@ -122,8 +130,8 @@ public void testShardAwareness() {
122130 @ Test
123131 public void testAlternator () {
124132 try ( // alternator {
125- ScyllaDBContainer scylladb = new ScyllaDBContainer (SCYLLADB_IMAGE ).withAlternator ()
126- // }
133+ ScyllaDBContainer scylladb = new ScyllaDBContainer (SCYLLADB_IMAGE ).withAlternator ()
134+ // }
127135 ) {
128136 scylladb .start ();
129137
0 commit comments