From a5b0fecee722961f2853282dfd547c685cc1b697 Mon Sep 17 00:00:00 2001 From: Keith Holman Date: Thu, 5 Jun 2014 14:49:01 -0400 Subject: keystone: fix paths for testing Keystone tests are designed to run on the source tree. However, Keystone is installed on a system with files in various directories. This fix patches the testing source files to be able to find the files on the distribution. This fix incorporates the changes of a previous patch file into a new patch file that is generated, since the previous patch are related and close to eachother in the source and it is easier to maintain less patch files. Signed-off-by: Keith Holman --- .../Update-test-core-ETCDIR-location.patch | 24 ------------ ...-search-in-etc-directory-for-config-files.patch | 44 ++++++++++++++++++++++ 2 files changed, 44 insertions(+), 24 deletions(-) delete mode 100644 meta-openstack/recipes-devtools/python/python-keystone/Update-test-core-ETCDIR-location.patch create mode 100644 meta-openstack/recipes-devtools/python/python-keystone/keystone-search-in-etc-directory-for-config-files.patch (limited to 'meta-openstack/recipes-devtools/python/python-keystone') diff --git a/meta-openstack/recipes-devtools/python/python-keystone/Update-test-core-ETCDIR-location.patch b/meta-openstack/recipes-devtools/python/python-keystone/Update-test-core-ETCDIR-location.patch deleted file mode 100644 index 458b618..0000000 --- a/meta-openstack/recipes-devtools/python/python-keystone/Update-test-core-ETCDIR-location.patch +++ /dev/null @@ -1,24 +0,0 @@ -Update test core ETCDIR location - -Tests in keystone/tests are failed because they -looks for some config files at wrong location. -Currently all the keystone config files are at -/etc/keystone. - -Signed-off-by: Vu Tran -diff --git a/keystone/tests/core.py b/keystone/tests/core.py -index 860f68d..565cbcc 100644 ---- a/keystone/tests/core.py -+++ b/keystone/tests/core.py -@@ -77,7 +77,7 @@ LOG = logging.getLogger(__name__) - TESTSDIR = os.path.dirname(os.path.abspath(__file__)) - ROOTDIR = os.path.normpath(os.path.join(TESTSDIR, '..', '..')) - VENDOR = os.path.join(ROOTDIR, 'vendor') --ETCDIR = os.path.join(ROOTDIR, 'etc') -+ETCDIR = "/etc/keystone" - TMPDIR = os.path.join(TESTSDIR, 'tmp') - - CONF = config.CONF --- -1.7.9.5 - 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 @@ +From ed3c1f7c8eb90506eda1aafbc6d4de3b9e2abe71 Mon Sep 17 00:00:00 2001 +From: Keith Holman +Date: Tue, 3 Jun 2014 11:28:23 -0400 +Subject: [PATCH] keystone: search in etc directory for config files + +The core.py file in the tests directory is setup to find +the file as they exist in the source code tree. When +deployed some configuration files are moved to the /etc +directory. This modification changes the test code to +find the files in the new location. + +Signed-off-by: Keith Holman +--- + keystone/tests/core.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/keystone/tests/core.py b/keystone/tests/core.py +index 860f68d..8e069fb 100644 +--- a/keystone/tests/core.py ++++ b/keystone/tests/core.py +@@ -75,9 +75,9 @@ from keystone.openstack.common import policy as common_policy # noqa + + LOG = logging.getLogger(__name__) + TESTSDIR = os.path.dirname(os.path.abspath(__file__)) +-ROOTDIR = os.path.normpath(os.path.join(TESTSDIR, '..', '..')) ++ROOTDIR = os.path.normpath(os.path.join(TESTSDIR, '..')) + VENDOR = os.path.join(ROOTDIR, 'vendor') +-ETCDIR = os.path.join(ROOTDIR, 'etc') ++ETCDIR = "/etc/keystone" + TMPDIR = os.path.join(TESTSDIR, 'tmp') + + CONF = config.CONF +@@ -380,7 +380,7 @@ class TestCase(NoModule, testtools.TestCase): + def _paste_config(self, config): + if not config.startswith('config:'): + test_path = os.path.join(TESTSDIR, config) +- etc_path = os.path.join(ROOTDIR, 'etc', config) ++ etc_path = os.path.join(ETCDIR, config) + for path in [test_path, etc_path]: + if os.path.exists('%s-paste.ini' % path): + return 'config:%s-paste.ini' % path +-- +1.9.3 + -- cgit v1.2.3-54-g00ecf