summaryrefslogtreecommitdiffstats
path: root/tests/test_config.py
diff options
context:
space:
mode:
authorAlan Pevec <apevec@redhat.com>2013-03-09 01:58:33 +0100
committerAlan Pevec <apevec@redhat.com>2013-05-26 17:36:08 +0200
commit64738924b87e6fb31d999e25da23f889a2658940 (patch)
treeea3abedea6d1ad6c7bc72550129e5f21c7d8eee5 /tests/test_config.py
parentaf4e96986f6ee45e9e4ccac0b143902362a1a676 (diff)
downloadkeystone-64738924b87e6fb31d999e25da23f889a2658940.tar.gz
keystone-64738924b87e6fb31d999e25da23f889a2658940.tar.xz
keystone-64738924b87e6fb31d999e25da23f889a2658940.zip
separate paste-deploy configuration from parameters
PasteDeploy configuration contains class names which might change between releases. Keeping it separate from user-configurable parameters allows deployers to move paste-deploy ini file out of configuration directory to a place where it can be safely overwritten on updates e.g. under /usr/share/ DocImpact Change-Id: I9292ca6226c8430b93565dedd45cc842742a23e2
Diffstat (limited to 'tests/test_config.py')
-rw-r--r--tests/test_config.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py
new file mode 100644
index 00000000..ae134b68
--- /dev/null
+++ b/tests/test_config.py
@@ -0,0 +1,18 @@
+from keystone import config
+from keystone import exception
+from keystone import test
+
+
+CONF = config.CONF
+
+
+class ConfigTestCase(test.TestCase):
+ def test_paste_config(self):
+ self.assertEqual(config.find_paste_config(),
+ test.etcdir('keystone-paste.ini'))
+ self.opt_in_group('paste_deploy', config_file='XYZ')
+ self.assertRaises(exception.PasteConfigNotFound,
+ config.find_paste_config)
+ self.opt_in_group('paste_deploy', config_file='')
+ self.assertEqual(config.find_paste_config(),
+ test.etcdir('keystone.conf.sample'))