summaryrefslogtreecommitdiff
path: root/nova/tests/unit
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-12-12 15:16:14 +0000
committerGerrit Code Review <review@openstack.org>2022-12-12 15:16:14 +0000
commite40ac0c798164d9d6c46088e783a5b117f7a3a90 (patch)
tree4b4b3f4bcd78252405eaa3c63ef94664a98b3361 /nova/tests/unit
parentbee679751bea7f66d344717263011eb421c92421 (diff)
parent73fe84fa0ea6f7c7fa55544f6bce5326d87743a6 (diff)
downloadnova-e40ac0c798164d9d6c46088e783a5b117f7a3a90.tar.gz
Merge "Support multiple config file with mod_wsgi"
Diffstat (limited to 'nova/tests/unit')
-rw-r--r--nova/tests/unit/api/openstack/test_wsgi_app.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/nova/tests/unit/api/openstack/test_wsgi_app.py b/nova/tests/unit/api/openstack/test_wsgi_app.py
index 94e2fe5cb1..0eb7011c11 100644
--- a/nova/tests/unit/api/openstack/test_wsgi_app.py
+++ b/nova/tests/unit/api/openstack/test_wsgi_app.py
@@ -104,3 +104,18 @@ document_root = /tmp
'disable_compute_service_check_for_ffu', True,
group='workarounds')
wsgi_app._setup_service('myhost', 'api')
+
+ def test__get_config_files_empty_env(self):
+ env = {}
+ result = wsgi_app._get_config_files(env)
+ expected = ['/etc/nova/api-paste.ini', '/etc/nova/nova.conf']
+ self.assertEqual(result, expected)
+
+ def test__get_config_files_with_env(self):
+ env = {
+ "OS_NOVA_CONFIG_DIR": "/nova",
+ "OS_NOVA_CONFIG_FILES": "api.conf",
+ }
+ result = wsgi_app._get_config_files(env)
+ expected = ['/nova/api.conf']
+ self.assertEqual(result, expected)