diff options
author | Simeon Monov <sdmonov@us.ibm.com> | 2014-07-16 07:32:38 +0300 |
---|---|---|
committer | Simeon Monov <sdmonov@us.ibm.com> | 2014-07-24 03:01:50 +0300 |
commit | 814e68b61d65c56393abe214ce3184b24383fcbc (patch) | |
tree | 7a65341ef5b7d2d43308a26e0ce7989998b91227 | |
parent | 9b25f5796ab05d6109a4df2a56600f2dbe2a6d42 (diff) | |
download | tempest-lib-814e68b61d65c56393abe214ce3184b24383fcbc.tar.gz |
Fix exception when api_extensions is set to empty
test.is_extension_enabled() is not checking if
config_dict[service] list is empty
Added a check if config_dict[service] is empty the
function will return False which means no extensions
are enabled
Change-Id: I2ee64f205c393637b5fc65897f1489292781c0be
Closes-Bug: 1342516
-rw-r--r-- | tempest/test.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tempest/test.py b/tempest/test.py index afe7a96..5b7330b 100644 --- a/tempest/test.py +++ b/tempest/test.py @@ -215,6 +215,8 @@ def is_extension_enabled(extension_name, service): 'network': CONF.network_feature_enabled.api_extensions, 'object': CONF.object_storage_feature_enabled.discoverable_apis, } + if len(config_dict[service]) == 0: + return False if config_dict[service][0] == 'all': return True if extension_name in config_dict[service]: |