tests: allow to skip if no database URL
This is needed for certain driver that we may not want to test if there's no URL provided in the scenario, i.e. no environment variable can be found. Change-Id: I0301987885184ce1e2f83c10db99dba70450449a
This commit is contained in:
@@ -33,6 +33,10 @@ from ceilometer.tests import base as test_base
|
||||
class TestBase(test_base.BaseTestCase):
|
||||
def setUp(self):
|
||||
super(TestBase, self).setUp()
|
||||
|
||||
if self.database_connection is None:
|
||||
self.skipTest("No connection URL set")
|
||||
|
||||
self.CONF = self.useFixture(config.Config()).conf
|
||||
self.CONF.set_override('connection', str(self.database_connection),
|
||||
group='database')
|
||||
|
||||
Reference in New Issue
Block a user