Skip to content
Browse files
Add TLS test for cqlsh
patch by Brandon Williams, reviewed by Ekaterina Dimitrova, Adam Holmberg and David Capwell for CASSANDRA-16695
  • Loading branch information
driftx authored and ekaterinadimitrova2 committed Jun 12, 2021
1 parent f9ff078 commit c72f6960caf2ec723bddec59030ab6679b6c63a4
Showing 1 changed file with 24 additions and 1 deletion.
@@ -29,7 +29,8 @@
from dtest_setup_overrides import DTestSetupOverrides
from tools.assertions import assert_all, assert_none
from import create_c1c2_table, insert_c1c2, rows_to_list
from tools.misc import ImmutableMapping
from tools.misc import ImmutableMapping, generate_ssl_stores

from . import util

since = pytest.mark.since
@@ -171,6 +172,28 @@ def test_simple_insert(self):

assert {1: 'one', 2: 'two', 3: 'three', 4: 'four', 5: 'five'} == {k: v for k, v in rows}

def test_tls(self):
""" Test that TLSv1.2 connections work CASSANDRA-16695 """
'client_encryption_options': {
'enabled': True,
'optional': False,
'protocol': 'TLSv1.2',
'keystore': os.path.join(self.fixture_dtest_setup.test_path, 'keystore.jks'),
'keystore_password': 'cassandra'


node1, = self.cluster.nodelist()

out, err = self.run_cqlsh(node1, cmds="DESCRIBE KEYSPACES", cqlsh_options=['--ssl'], env_vars={'SSL_CERTFILE': os.path.join(self.fixture_dtest_setup.test_path, 'ccm_node.cer')})
assert err == ''

def test_lwt(self):
Test LWT inserts and updates.

0 comments on commit c72f696

Please sign in to comment.