Fixing configuration issue with ssl test
This commit is contained in:
parent
9b8f7ef8b1
commit
8ec890be85
@ -21,7 +21,7 @@ import os, sys, traceback, logging, ssl, time
|
||||
from cassandra.cluster import Cluster, NoHostAvailable
|
||||
from cassandra import ConsistencyLevel
|
||||
from cassandra.query import SimpleStatement
|
||||
from tests.integration import use_singledc, PROTOCOL_VERSION, get_cluster, remove_cluster
|
||||
from tests.integration import PROTOCOL_VERSION, get_cluster, remove_cluster, use_single_node
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -44,7 +44,7 @@ def setup_cluster_ssl(client_auth=False):
|
||||
ssl connectivity, and client authenticiation if needed.
|
||||
"""
|
||||
|
||||
use_singledc(start=False)
|
||||
use_single_node(start=False)
|
||||
ccm_cluster = get_cluster()
|
||||
ccm_cluster.stop()
|
||||
|
||||
@ -68,16 +68,6 @@ def setup_cluster_ssl(client_auth=False):
|
||||
ccm_cluster.start(wait_for_binary_proto=True, wait_other_notice=True)
|
||||
|
||||
|
||||
def teardown_module():
|
||||
"""
|
||||
The rest of the tests don't need ssl enabled, remove the cluster so as to not interfere with other tests.
|
||||
"""
|
||||
|
||||
ccm_cluster = get_cluster()
|
||||
ccm_cluster.stop()
|
||||
remove_cluster()
|
||||
|
||||
|
||||
def validate_ssl_options(ssl_options):
|
||||
# find absolute path to client CA_CERTS
|
||||
tries = 0
|
||||
@ -116,6 +106,12 @@ class SSLConnectionTests(unittest.TestCase):
|
||||
def setUpClass(cls):
|
||||
setup_cluster_ssl()
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
ccm_cluster = get_cluster()
|
||||
ccm_cluster.stop()
|
||||
remove_cluster()
|
||||
|
||||
def test_can_connect_with_ssl_ca(self):
|
||||
"""
|
||||
Test to validate that we are able to connect to a cluster using ssl.
|
||||
@ -204,6 +200,12 @@ class SSLConnectionAuthTests(unittest.TestCase):
|
||||
def setUpClass(cls):
|
||||
setup_cluster_ssl(client_auth=True)
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
ccm_cluster = get_cluster()
|
||||
ccm_cluster.stop()
|
||||
remove_cluster()
|
||||
|
||||
def test_can_connect_with_ssl_client_auth(self):
|
||||
"""
|
||||
Test to validate that we can connect to a C* cluster that has client_auth enabled.
|
||||
|
Loading…
Reference in New Issue
Block a user