Commit 65649b26 authored by Vincent Pelletier's avatar Vincent Pelletier

Pick database parameters from environment.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2226 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent d5a22e81
......@@ -26,10 +26,10 @@ from neo.protocol import Packets
from time import time, gmtime
from struct import pack, unpack
DB_PREFIX = 'test_neo_'
DB_ADMIN = 'root'
DB_PASSWD = None
DB_USER = 'test'
DB_PREFIX = os.getenv('NEO_DB_PREFIX', 'test_neo_')
DB_ADMIN = os.getenv('NEO_DB_ADMIN', 'root')
DB_PASSWD = os.getenv('NEO_DB_PASSWD', None)
DB_USER = os.getenv('NEO_DB_USER', 'test')
class NeoTestBase(unittest.TestCase):
""" Base class for neo tests, implements common checks """
......
......@@ -30,6 +30,7 @@ import threading
from neo.neoctl.neoctl import NeoCTL, NotReadyException
from neo.protocol import ClusterStates, NodeTypes, CellStates
from neo.util import dump
from neo.tests import DB_ADMIN, DB_PASSWD
import neo
# Replace neo.setupLog by a no-op function.
......@@ -148,7 +149,7 @@ class NEOCluster(object):
def __init__(self, db_list, master_node_count=1,
partitions=1, replicas=0, port_base=10000,
db_user='neo', db_password='neo',
db_super_user='root', db_super_password=None,
db_super_user=DB_ADMIN, db_super_password=DB_PASSWD,
cleanup_on_delete=False, temp_dir=None,
clear_databases=True, adapter='MySQL',
verbose=True):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment