]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Set lock_path in tests
authorBen Nemec <openstack@nemebean.com>
Wed, 7 Aug 2013 15:54:34 +0000 (10:54 -0500)
committerBen Nemec <openstack@nemebean.com>
Wed, 7 Aug 2013 15:56:19 +0000 (10:56 -0500)
This is required to sync a locking fix from Oslo.

Change-Id: I1f71d7137eab2509a24c5e1397da653142561f10
Related-Bug: 1065531

cinder/test.py

index 5239d13d6db4292713f54701e169f5bef10c665a..9d58c7ee5500c9b54b6082a5acf2d3c43e6744bb 100644 (file)
@@ -27,6 +27,7 @@ inline callbacks.
 import functools
 import os
 import shutil
+import tempfile
 import uuid
 
 import fixtures
@@ -168,6 +169,8 @@ class TestCase(testtools.TestCase):
         self._services = []
 
         CONF.set_override('fatal_exception_format_errors', True)
+        # This will be cleaned up by the NestedTempfile fixture
+        CONF.set_override('lock_path', tempfile.mkdtemp())
 
     def tearDown(self):
         """Runs after each test method to tear down test environment."""