diff options
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-keystone/keystone-search-in-etc-directory-for-config-files.patch')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-keystone/keystone-search-in-etc-directory-for-config-files.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-keystone/keystone-search-in-etc-directory-for-config-files.patch b/meta-openstack/recipes-devtools/python/python-keystone/keystone-search-in-etc-directory-for-config-files.patch new file mode 100644 index 0000000..1259a20 --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-keystone/keystone-search-in-etc-directory-for-config-files.patch | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | From ed3c1f7c8eb90506eda1aafbc6d4de3b9e2abe71 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Keith Holman <Keith.Holman@windriver.com> | ||
| 3 | Date: Tue, 3 Jun 2014 11:28:23 -0400 | ||
| 4 | Subject: [PATCH] keystone: search in etc directory for config files | ||
| 5 | |||
| 6 | The core.py file in the tests directory is setup to find | ||
| 7 | the file as they exist in the source code tree. When | ||
| 8 | deployed some configuration files are moved to the /etc | ||
| 9 | directory. This modification changes the test code to | ||
| 10 | find the files in the new location. | ||
| 11 | |||
| 12 | Signed-off-by: Keith Holman <Keith.Holman@windriver.com> | ||
| 13 | --- | ||
| 14 | keystone/tests/core.py | 6 +++--- | ||
| 15 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/keystone/tests/core.py b/keystone/tests/core.py | ||
| 18 | index 860f68d..8e069fb 100644 | ||
| 19 | --- a/keystone/tests/core.py | ||
| 20 | +++ b/keystone/tests/core.py | ||
| 21 | @@ -75,9 +75,9 @@ from keystone.openstack.common import policy as common_policy # noqa | ||
| 22 | |||
| 23 | LOG = logging.getLogger(__name__) | ||
| 24 | TESTSDIR = os.path.dirname(os.path.abspath(__file__)) | ||
| 25 | -ROOTDIR = os.path.normpath(os.path.join(TESTSDIR, '..', '..')) | ||
| 26 | +ROOTDIR = os.path.normpath(os.path.join(TESTSDIR, '..')) | ||
| 27 | VENDOR = os.path.join(ROOTDIR, 'vendor') | ||
| 28 | -ETCDIR = os.path.join(ROOTDIR, 'etc') | ||
| 29 | +ETCDIR = "/etc/keystone" | ||
| 30 | TMPDIR = os.path.join(TESTSDIR, 'tmp') | ||
| 31 | |||
| 32 | CONF = config.CONF | ||
| 33 | @@ -380,7 +380,7 @@ class TestCase(NoModule, testtools.TestCase): | ||
| 34 | def _paste_config(self, config): | ||
| 35 | if not config.startswith('config:'): | ||
| 36 | test_path = os.path.join(TESTSDIR, config) | ||
| 37 | - etc_path = os.path.join(ROOTDIR, 'etc', config) | ||
| 38 | + etc_path = os.path.join(ETCDIR, config) | ||
| 39 | for path in [test_path, etc_path]: | ||
| 40 | if os.path.exists('%s-paste.ini' % path): | ||
| 41 | return 'config:%s-paste.ini' % path | ||
| 42 | -- | ||
| 43 | 1.9.3 | ||
| 44 | |||
