test_mismatch_[size|checksum] incorrectly assert image data was deleted

Bug #1177818 reported by Alex Meade
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Low
Alex Meade

Bug Description

The test_mismatch_size and test_mismatch_checksum tests in glance/tests/functional/v1/test_api.py incorrectly check for image data when asserting it was removed.

Currently:
         image_count = len([name for name in os.listdir(images_dir)
                           if os.path.isfile(name)])

This will always = 0 since it's checking if 'name' is a file when it needs to check the full path of the file since the tests are not run from the temp directory.

Changed in glance:
milestone: none → havana-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/28446
Committed: http://github.com/openstack/glance/commit/00cc32ccf6847ef649fbb9c1905f823c91903f44
Submitter: Jenkins
Branch: master

commit 00cc32ccf6847ef649fbb9c1905f823c91903f44
Author: Alex Meade <email address hidden>
Date: Tue May 7 13:22:10 2013 -0400

    Fix test_mismatched_X test data deletion check

    The assertion checking if data for an image is deleted correctly will
    always pass. This is because it was using only the name of the file instead of
    the absolute path.

    Fixes bug 1177818

    Change-Id: I8b99a4156ce72cb278c9c173a27253ab191dd451

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: havana-1 → 2013.2
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.