summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Holman <Keith.Holman@windriver.com>2014-06-05 14:49:01 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-06-09 10:49:38 -0400
commitf56e67eec54ce793ca641b3325312c4c69c5a63b (patch)
tree9ee09286cba39b5a2fe3a14e636967f6bfd4c2cc
parent4e791aa8405287442732db2198a83cc3fab85a1a (diff)
downloadmeta-cloud-services-f56e67eec54ce793ca641b3325312c4c69c5a63b.tar.gz
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 <Keith.Holman@windriver.com>
-rw-r--r--meta-openstack/recipes-devtools/python/python-keystone/Update-test-core-ETCDIR-location.patch24
-rw-r--r--meta-openstack/recipes-devtools/python/python-keystone/keystone-search-in-etc-directory-for-config-files.patch44
-rw-r--r--meta-openstack/recipes-devtools/python/python-keystone_git.bb3
3 files changed, 46 insertions, 25 deletions
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 @@
1Update test core ETCDIR location
2
3Tests in keystone/tests are failed because they
4looks for some config files at wrong location.
5Currently all the keystone config files are at
6/etc/keystone.
7
8Signed-off-by: Vu Tran <vu.tran@windriver.com>
9diff --git a/keystone/tests/core.py b/keystone/tests/core.py
10index 860f68d..565cbcc 100644
11--- a/keystone/tests/core.py
12+++ b/keystone/tests/core.py
13@@ -77,7 +77,7 @@ LOG = logging.getLogger(__name__)
14 TESTSDIR = os.path.dirname(os.path.abspath(__file__))
15 ROOTDIR = os.path.normpath(os.path.join(TESTSDIR, '..', '..'))
16 VENDOR = os.path.join(ROOTDIR, 'vendor')
17-ETCDIR = os.path.join(ROOTDIR, 'etc')
18+ETCDIR = "/etc/keystone"
19 TMPDIR = os.path.join(TESTSDIR, 'tmp')
20
21 CONF = config.CONF
22--
231.7.9.5
24
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 @@
1From ed3c1f7c8eb90506eda1aafbc6d4de3b9e2abe71 Mon Sep 17 00:00:00 2001
2From: Keith Holman <Keith.Holman@windriver.com>
3Date: Tue, 3 Jun 2014 11:28:23 -0400
4Subject: [PATCH] keystone: search in etc directory for config files
5
6The core.py file in the tests directory is setup to find
7the file as they exist in the source code tree. When
8deployed some configuration files are moved to the /etc
9directory. This modification changes the test code to
10find the files in the new location.
11
12Signed-off-by: Keith Holman <Keith.Holman@windriver.com>
13---
14 keystone/tests/core.py | 6 +++---
15 1 file changed, 3 insertions(+), 3 deletions(-)
16
17diff --git a/keystone/tests/core.py b/keystone/tests/core.py
18index 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--
431.9.3
44
diff --git a/meta-openstack/recipes-devtools/python/python-keystone_git.bb b/meta-openstack/recipes-devtools/python/python-keystone_git.bb
index 794f119..70132cc 100644
--- a/meta-openstack/recipes-devtools/python/python-keystone_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-keystone_git.bb
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \
12 file://identity.sh \ 12 file://identity.sh \
13 file://keystone \ 13 file://keystone \
14 file://openrc \ 14 file://openrc \
15 file://Update-test-core-ETCDIR-location.patch \ 15 file://keystone-search-in-etc-directory-for-config-files.patch \
16 " 16 "
17 17
18SRCREV="e7c29874e5a0e43f4f0e9970556c701af508152f" 18SRCREV="e7c29874e5a0e43f4f0e9970556c701af508152f"
@@ -39,6 +39,7 @@ do_install_append() {
39 install -m 600 ${S}/etc/logging.conf.sample ${KEYSTONE_CONF_DIR}/logging.conf 39 install -m 600 ${S}/etc/logging.conf.sample ${KEYSTONE_CONF_DIR}/logging.conf
40 install -m 600 ${S}/etc/policy.json ${KEYSTONE_CONF_DIR}/policy.json 40 install -m 600 ${S}/etc/policy.json ${KEYSTONE_CONF_DIR}/policy.json
41 install -m 600 ${S}/etc/keystone.conf.sample ${KEYSTONE_CONF_DIR}/keystone.conf.sample 41 install -m 600 ${S}/etc/keystone.conf.sample ${KEYSTONE_CONF_DIR}/keystone.conf.sample
42 install -m 600 ${S}/etc/keystone-paste.ini ${KEYSTONE_CONF_DIR}/keystone-paste.ini
42 43
43 sed -e "s:%SERVICE_TOKEN%:${SERVICE_TOKEN}:g" -i ${KEYSTONE_CONF_DIR}/keystone.conf 44 sed -e "s:%SERVICE_TOKEN%:${SERVICE_TOKEN}:g" -i ${KEYSTONE_CONF_DIR}/keystone.conf
44 sed -e "s:%DB_USER%:${DB_USER}:g" -i ${KEYSTONE_CONF_DIR}/keystone.conf 45 sed -e "s:%DB_USER%:${DB_USER}:g" -i ${KEYSTONE_CONF_DIR}/keystone.conf