Merge "Drop redundant check of sqlite3 module availability"
This commit is contained in:
@@ -1742,10 +1742,9 @@ One main configuration file option affects the image cache.
|
|||||||
be :ref:`migrated <sqlite-to-centralized_db-migration>` to
|
be :ref:`migrated <sqlite-to-centralized_db-migration>` to
|
||||||
central database on service restart during upgrade process.
|
central database on service restart during upgrade process.
|
||||||
|
|
||||||
The ``sqlite`` cache driver has no special dependencies, other
|
The ``sqlite`` cache driver has no special dependencies, and uses
|
||||||
than the ``python-sqlite3`` library, which is installed on virtually
|
the built-in ``sqlite3`` module. It stores information about the cached
|
||||||
all operating systems with modern versions of Python. It stores
|
files in a SQLite database.
|
||||||
information about the cached files in a SQLite database.
|
|
||||||
|
|
||||||
**NOTE**
|
**NOTE**
|
||||||
In Caracal release ``sqlite`` cache driver has been deprecated and will
|
In Caracal release ``sqlite`` cache driver has been deprecated and will
|
||||||
|
@@ -619,26 +619,8 @@ class TestImageCacheSqlite(test_utils.BaseTestCase,
|
|||||||
"""Tests image caching when SQLite is used in cache"""
|
"""Tests image caching when SQLite is used in cache"""
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
"""
|
|
||||||
Test to see if the pre-requisites for the image cache
|
|
||||||
are working (python-sqlite3 installed)
|
|
||||||
"""
|
|
||||||
super(TestImageCacheSqlite, self).setUp()
|
super(TestImageCacheSqlite, self).setUp()
|
||||||
|
|
||||||
if getattr(self, 'disable', False):
|
|
||||||
return
|
|
||||||
|
|
||||||
if not getattr(self, 'inited', False):
|
|
||||||
try:
|
|
||||||
import sqlite3 # noqa
|
|
||||||
except ImportError:
|
|
||||||
self.inited = True
|
|
||||||
self.disabled = True
|
|
||||||
self.disabled_message = ("python-sqlite3 not installed.")
|
|
||||||
return
|
|
||||||
|
|
||||||
self.inited = True
|
|
||||||
self.disabled = False
|
|
||||||
self.cache_dir = self.useFixture(fixtures.TempDir()).path
|
self.cache_dir = self.useFixture(fixtures.TempDir()).path
|
||||||
self.config(image_cache_dir=self.cache_dir,
|
self.config(image_cache_dir=self.cache_dir,
|
||||||
image_cache_driver='sqlite',
|
image_cache_driver='sqlite',
|
||||||
|
Reference in New Issue
Block a user