MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / setup_cluster_ssl

Function setup_cluster_ssl

tests/integration/long/test_ssl.py:69–91  ·  view source on GitHub ↗

We need some custom setup for this module. This will start the ccm cluster with basic ssl connectivity, and client authentication if needed.

(client_auth=False)

Source from the content-addressed store, hash-verified

67
68
69def setup_cluster_ssl(client_auth=False):
70 """
71 We need some custom setup for this module. This will start the ccm cluster with basic
72 ssl connectivity, and client authentication if needed.
73 """
74
75 use_single_node(start=False)
76 ccm_cluster = get_cluster()
77 ccm_cluster.stop()
78
79 # Configure ccm to use ssl.
80 config_options = {'client_encryption_options': {'enabled': True,
81 'keystore': SERVER_KEYSTORE_PATH,
82 'keystore_password': DEFAULT_PASSWORD}}
83
84 if(client_auth):
85 client_encyrption_options = config_options['client_encryption_options']
86 client_encyrption_options['require_client_auth'] = True
87 client_encyrption_options['truststore'] = SERVER_TRUSTSTORE_PATH
88 client_encyrption_options['truststore_password'] = DEFAULT_PASSWORD
89
90 ccm_cluster.set_configuration_options(config_options)
91 start_cluster_wait_for_up(ccm_cluster)
92
93
94def validate_ssl_options(**kwargs):

Callers 4

setUpClassMethod · 0.85
setUpClassMethod · 0.85
setUpClassMethod · 0.85
setUpClassMethod · 0.85

Calls 5

use_single_nodeFunction · 0.90
get_clusterFunction · 0.90
stopMethod · 0.45

Tested by

no test coverage detected