maulin-vasavada commented on code in PR #3985:
URL: https://github.com/apache/cassandra/pull/3985#discussion_r2034497053


##########
test/unit/org/apache/cassandra/tools/LoaderOptionsTest.java:
##########
@@ -85,6 +85,34 @@ public void testEncryptionSettings() throws Exception
         assertEquals("test.jks", options.clientEncOptions.keystore);
     }
 
+    /**
+     * Tests for client_encryption_options override from the command line.
+     */
+    @Test
+    public void testEncryptionSettingsOverride() throws Exception
+    {
+        // Default Cassandra config
+        File config = new File(Paths.get(".", "test", "conf", 
"cassandra-mtls.yaml").normalize());
+        String[] args = { "-d", "127.9.9.1", "-f", config.absolutePath(),
+                          "-ts", "test.jks", "-tspw", "truststorePass1",
+                          "-ks", "test.jks", "-kspw", "testdata1",
+                          "--ssl-ciphers", "TLS_RSA_WITH_AES_256_CBC_SHA",
+                          "--ssl-alg", "SunX509", "--store-type", "JKS", 
"--ssl-protocol", "TLS",
+                          sstableDirName("legacy_sstables", 
"legacy_ma_simple") };
+        LoaderOptions options = 
LoaderOptions.builder().parseArgs(args).build();
+        // Below two lines validating server encryption options is to verify 
that we are loading config from the yaml
+        assertEquals("test/conf/cassandra_ssl_test.keystore", 
options.serverEncOptions.keystore);

Review Comment:
   @smiklosovic done. I used constant from the `TlsTestUtils`. However other 
constants since they were local to the test I kept it like that. Please check.



-- 
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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to