There is an exception if api_extensions is set to empty in tempest.conf

Bug #1342516 reported by Simeon Monov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Simeon Monov

Bug Description

If api_extensions is set to empty in tempest.conf (like api_extensions=) there is an exception in test.is_extension_enabled code.

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/suite.py", line 208, in run
    self.setUp()
  File "/usr/lib/python2.7/dist-packages/nose/suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "/usr/lib/python2.7/dist-packages/nose/suite.py", line 314, in setupContext
    try_run(context, names)
  File "/usr/lib/python2.7/dist-packages/nose/util.py", line 471, in try_run
    return func()
  File "/home/moni/src/openstack1/tempest/tempest/api/network/test_fwaas_extensions.py", line 51, in setUpClass
    if not test.is_extension_enabled('fwaas', 'network'):
  File "/home/moni/src/openstack1/tempest/tempest/test.py", line 218, in is_extension_enabled
    if config_dict[service][0] == 'all':
IndexError: list index out of range

This is valid for all the sections in the file that has this parameter: compute-feature-enabled, network-feature-enabled, volume-feature-enabled.

This could be set to empty to disable the tests of all the extensions for a particular service for example. Workaround is to set it to non existent extension:

[network-feature-enabled]
api_extensions = none

Simeon Monov (sdmonov)
Changed in tempest:
assignee: nobody → Simeon Monov (sdmonov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.openstack.org/107230

Changed in tempest:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/107230
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=5d7effe9e497e9d73b6b68314b530e12ea314823
Submitter: Jenkins
Branch: master

commit 5d7effe9e497e9d73b6b68314b530e12ea314823
Author: Simeon Monov <email address hidden>
Date: Wed Jul 16 07:32:38 2014 +0300

    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

Changed in tempest:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.