diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-10-02 21:17:40 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-10-02 21:17:40 +0000 |
commit | 96d828fb697a78042ac0117790f8bd70c6a691f6 (patch) | |
tree | 2d68ceaac775495219d809aaac898e186f3e19f7 | |
parent | aab7c1317c7d4b2e8622bd53120d889118c00c05 (diff) | |
parent | e9704d0f019be530d5952844feecaf0ed4e31914 (diff) | |
download | nova-2013.2.rc1.tar.gz |
Merge "Skip test if sqlite3 not installed"2013.2.rc1
-rw-r--r-- | nova/tests/db/test_sqlite.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/nova/tests/db/test_sqlite.py b/nova/tests/db/test_sqlite.py index 672ee53305..fa9d1134eb 100644 --- a/nova/tests/db/test_sqlite.py +++ b/nova/tests/db/test_sqlite.py @@ -19,6 +19,7 @@ """Test cases for sqlite-specific logic""" +from nova.openstack.common import processutils from nova import test from nova import utils import os @@ -48,7 +49,15 @@ class TestSqlite(test.NoDBTestCase): get_schema_cmd = "sqlite3 %s '.schema'" % self.db_file engine = create_engine("sqlite:///%s" % self.db_file) base_class.metadata.create_all(engine) - output, _ = utils.execute(get_schema_cmd, shell=True) + try: + output, _ = utils.execute(get_schema_cmd, shell=True) + except processutils.ProcessExecutionError as e: + # NOTE(alaski): If this check becomes necessary in other tests it + # should be moved into setUp. + if 'not found' in str(e): + self.skipTest(str(e)) + else: + raise self.assertFalse('BIGINT' in output, msg="column type BIGINT " "not converted to INTEGER in schema") |