]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Use lockutils.set_defaults to set lock_path in test
authorJay S. Bryant <jsbryant@us.ibm.com>
Tue, 13 Jan 2015 22:25:24 +0000 (16:25 -0600)
committerJay S. Bryant <jsbryant@us.ibm.com>
Tue, 13 Jan 2015 22:30:26 +0000 (16:30 -0600)
Commit 9dd6d212f0d8fd74c29077a786fb6d770a2a0bba for oslo.concurrency's
lockutils appears to have broken our unit tests.

Twelve of the the storwize_svc unit tests started failing with the
complaint that the required configuration option 'lock_path' was not set.

This change updates cinder/test.py to not only set up a temporary
lock_path location that will be automatically cleaned up, but to also
register that temporary lock_path location using lockutils.set_defaults()
to correct the problem.

Change-Id: I011888f676ebc170e7285048b7e5a638a5a8c9a9
Closes-bug: 1410485

cinder/test.py

index 176baeaee3188b658c0303283d8e0f96ac3ee3c3..7fb7d95fbf13090059bcf3872013fd8308cce008 100644 (file)
@@ -189,6 +189,7 @@ class TestCase(testtools.TestCase):
             config_fixture.Config(lockutils.CONF))
         self.fixture.config(lock_path=lock_path,
                             group='oslo_concurrency')
+        lockutils.set_defaults(lock_path)
         self.override_config('policy_file',
                              os.path.join(
                                  os.path.abspath(