Should skip some test_list_servers tests when image_ref_alt is not found

Bug #912596 reported by Jay Pipes
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Medium
Jay Pipes

Bug Description

image_ref_alt=4 by default. This, of course, doesn't make any sense in our new world of UUID image identifiers.

So, if you only have a single base image (like is the case for a default devstack install) you will see the following:

ERROR: test suite for <class 'tempest.tests.test_list_servers.ServerDetailsTest'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 208, in run
    self.setUp()
  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 314, in setupContext
    try_run(context, names)
  File "/usr/lib/pymodules/python2.7/nose/util.py", line 478, in try_run
    return func()
  File "/home/jpipes/repos/tempest/tempest/tests/test_list_servers.py", line 61, in setUpClass
    cls.image_ref_alt)
RuntimeError: Image 4 (image_ref_alt) was not found!

We should add a skipper to skip certain tests if only a single image is available.

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/2858

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/2858
Committed: http://github.com/openstack/tempest/commit/32621f97edbd90fac1c1b6c314b142aabbd403aa
Submitter: Jenkins
Branch: master

commit 32621f97edbd90fac1c1b6c314b142aabbd403aa
Author: Jay Pipes <email address hidden>
Date: Thu Jan 5 20:41:40 2012 -0500

    Fixes LP Bug #912596 - image_ref_alt not found

    * Adds skippers to tempest to enable skipping tests
      that don't meet certain conditions
    * Adds a check in test_list_servers.ServerDetailsTest.setUpClass
      that checks if the image with ID image_ref_alt actually exists
      and if it does not, marks a specific test as skipped.

    This is what the resulting test run looks like after adding
    the skip:

    jpipes@librebox:~/repos/tempest$ nosetests -sv tempest.tests.test_list_servers
    Return the full details of a single server ... ok
    Filter the detailed list of servers by flavor ... ok
    Filter the detailed list of servers by image ... SKIP: Only one image found
    Filter the detailed list of servers by server name ... ok
    Filter the detailed list of servers by server status ... ok
    Return a detailed list of all servers ... ok

    ----------------------------------------------------------------------
    Ran 6 tests in 108.909s

    OK (SKIP=1)

    Change-Id: Ia6178ca8201acc03566b785ec096eda51d0425c9

Changed in tempest:
status: In Progress → Fix Committed
Revision history for this message
David Kranz (david-kranz) wrote :

There were some problems with this fix. I think I corrected them in https://review.openstack.org/3183

Jay Pipes (jaypipes)
Changed in tempest:
status: Fix Committed → Fix Released
Sean Dague (sdague)
Changed in tempest:
milestone: none → havana-3
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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