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
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.
12 Signed-off-by: Keith Holman <Keith.Holman@windriver.com>
14 keystone/tests/core.py | 6 +++---
15 1 file changed, 3 insertions(+), 3 deletions(-)
17 Index: git/keystone/tests/core.py
18 ===================================================================
19 --- git.orig/keystone/tests/core.py
20 +++ git/keystone/tests/core.py
22 PID = six.text_type(os.getpid())
23 TESTSDIR = os.path.dirname(os.path.abspath(__file__))
24 TESTCONF = os.path.join(TESTSDIR, 'config_files')
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"
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