From: Eric Harney Date: Mon, 19 Jan 2015 18:10:00 +0000 (-0500) Subject: Add policy_dirs conf fixture X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=892ef5d6dbedbebcc500f1edd12f6218baf44b65;p=openstack-build%2Fcinder-build.git Add policy_dirs conf fixture 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 --- diff --git a/cinder/tests/conf_fixture.py b/cinder/tests/conf_fixture.py index 4bb29c998..487099d9c 100644 --- a/cinder/tests/conf_fixture.py +++ b/cinder/tests/conf_fixture.py @@ -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', [])