Revert the change using a temporary file for the database.
The sqlalchemy version is updated to >=0.7.8 (this includes
fixes for memory leaks).
Change-Id: Ib5d128edfef0f8e0afebaf408f7834fa3de2481a
LOG = logging.getLogger(__name__)
-TEST_DB = "quantum.test.db"
AGENT_OWNER_PREFIX = 'network:'
# must override __init__ and setup the database
# and not call into this class's __init__.
# This connection is setup as memory for the tests.
- db.configure_db({'sql_connection': "sqlite:///%s" % TEST_DB,
+ db.configure_db({'sql_connection': "sqlite:///:memory:",
'base': models_v2.model_base.BASEV2})
def _get_tenant_id_for_create(self, context, resource):
rpc_backend = quantum.openstack.common.rpc.impl_fake
[DATABASE]
-sql_connection = 'sqlite:///quantum.test.db'
\ No newline at end of file
+sql_connection = 'sqlite:///:memory:'
def setUp(self):
def new_init():
- db.configure_db({'sql_connection': 'sqlite:///quantum.test.db',
+ db.configure_db({'sql_connection': 'sqlite:///:memory:',
'base': network_models_v2.model_base.BASEV2})
with mock.patch.object(network_db_v2,
class RyuDBTest(unittest2.TestCase):
def setUp(self):
- options = {"sql_connection": 'sqlite:///quantum.test.db'}
+ options = {"sql_connection": 'sqlite:///:memory:'}
options.update({'base': models_v2.model_base.BASEV2})
reconnect_interval = cfg.CONF.DATABASE.reconnect_interval
options.update({"reconnect_interval": reconnect_interval})
cfg.CONF.reset()
# Restore the original attribute map
attributes.RESOURCE_ATTRIBUTE_MAP = self._attribute_map_bk
- # Remove test database
- if os.path.exists(db_base_plugin_v2.TEST_DB):
- os.remove('quantum.test.db')
def _req(self, method, resource, data=None, fmt='json',
id=None, params=None, action=None):
netaddr
python-quantumclient>=2.0
pyudev
-sqlalchemy>0.6.4
+sqlalchemy>=0.7.8
webob==1.0.8