diff options
author | Zuul <zuul@review.opendev.org> | 2022-12-12 15:16:14 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2022-12-12 15:16:14 +0000 |
commit | e40ac0c798164d9d6c46088e783a5b117f7a3a90 (patch) | |
tree | 4b4b3f4bcd78252405eaa3c63ef94664a98b3361 /nova/tests | |
parent | bee679751bea7f66d344717263011eb421c92421 (diff) | |
parent | 73fe84fa0ea6f7c7fa55544f6bce5326d87743a6 (diff) | |
download | nova-e40ac0c798164d9d6c46088e783a5b117f7a3a90.tar.gz |
Merge "Support multiple config file with mod_wsgi"
Diffstat (limited to 'nova/tests')
-rw-r--r-- | nova/tests/unit/api/openstack/test_wsgi_app.py | 15 |
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) |