Skip to content

Commit

Permalink
align native_transport_ssl_test with CASSANDRA-19397
Browse files Browse the repository at this point in the history
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-19397
  • Loading branch information
smiklosovic committed Feb 19, 2024
1 parent 26b939d commit 238cf5e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions native_transport_ssl_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,20 @@ def test_use_custom_ssl_port(self):
Connect to additional ssl enabled native transport port
@jira_ticket CASSANDRA-9590
"""
cluster = self._populateCluster(enableSSL=True, nativePortSSL=9666)

# native_transport_port_ssl was removed in CASSANDRA-19397
if self.cluster.version() > '5.0':
cluster = self._populateCluster(enableSSL=True, nativePort=9666)
else:
cluster = self._populateCluster(enableSSL=True, nativePortSSL=9666)

node1 = cluster.nodelist()[0]
cluster.start()

# we should be able to connect to default non-ssl port
session = self.patient_cql_connection(node1)
self._putget(cluster, session)
if self.cluster.version() <= '5.0':
# we should be able to connect to default non-ssl port
session = self.patient_cql_connection(node1)
self._putget(cluster, session)

# connect to additional dedicated ssl port
session = self.patient_cql_connection(node1, port=9666, ssl_opts={'ca_certs': os.path.join(self.fixture_dtest_setup.test_path, 'ccm_node.cer')})
Expand Down

0 comments on commit 238cf5e

Please sign in to comment.