Make cqlengine tests invoke ccm.
This commit is contained in:
@@ -156,14 +156,15 @@ def is_current_cluster(cluster_name, node_counts):
|
||||
|
||||
|
||||
def use_cluster(cluster_name, nodes, ipformat=None, start=True):
|
||||
global CCM_CLUSTER
|
||||
if USE_CCM_CASS_EXTERNAL:
|
||||
log.debug("Using external cluster %s", CCM_CLUSTER.name)
|
||||
return
|
||||
|
||||
if is_current_cluster(cluster_name, nodes):
|
||||
log.debug("Using existing cluster %s", cluster_name)
|
||||
return
|
||||
|
||||
global CCM_CLUSTER
|
||||
if CCM_CLUSTER:
|
||||
log.debug("Stopping cluster %s", CCM_CLUSTER.name)
|
||||
CCM_CLUSTER.stop()
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
from cassandra.cqlengine import connection
|
||||
from cassandra.cqlengine.management import create_keyspace
|
||||
|
||||
from tests.integration import PROTOCOL_VERSION
|
||||
from tests.integration import use_single_node, PROTOCOL_VERSION
|
||||
|
||||
|
||||
def setup_package():
|
||||
use_single_node()
|
||||
|
||||
keyspace = 'cqlengine_test'
|
||||
connection.setup(['localhost'],
|
||||
protocol_version=PROTOCOL_VERSION,
|
||||
|
||||
Reference in New Issue
Block a user