]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Add policy_dirs conf fixture
authorEric Harney <eharney@redhat.com>
Mon, 19 Jan 2015 18:10:00 +0000 (13:10 -0500)
committerEric Harney <eharney@redhat.com>
Mon, 19 Jan 2015 18:11:35 +0000 (13:11 -0500)
Unit tests that call into the policy enforcer from openstack
common will try to load files from the default directory of
'policy.d'.

Set the policy_dirs option to [] for unit tests since tests
are not trying to use policy from a directory like this, and
this will prevent test failures.

Change-Id: I7645179aeab3713a5addfccb0bb44a28e8fc4e87
Closes-Bug: #1412526

cinder/tests/conf_fixture.py

index 4bb29c998d75464a800ce195687d3b4574ffb006..487099d9c8bc0efaec11ea0ba801988f5b497e98 100644 (file)
@@ -52,3 +52,4 @@ def set_defaults(conf):
                      'cinder.scheduler.filter_scheduler.FilterScheduler')
     conf.set_default('state_path', os.path.abspath(
         os.path.join(os.path.dirname(__file__), '..', '..')))
+    conf.set_default('policy_dirs', [])