Volume tests depend on logging for "tests"

Bug #932137 reported by Jason Kölker
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Rongze Zhu
OpenStack Compute (nova)
Fix Released
Low
Rongze Zhu

Bug Description

nova.tests.test_volume:DriverTestCase and its subclasses install a logging StreamHandler to verify that the code logs what it expects, instead of testing the functionality.

Revision history for this message
Mark McLoughlin (markmc) wrote :

Ok, usage of this stream seems to be limited to the check_for_export() tests and should be easy to cleanup.

check_for_export() raises an exception if there's a problem and it does nothing if it succeeds

The tests should just check whether an exception was raised

For reference, this test code was introduced by this series of commits: 144fa50..0dcd680

Changed in nova:
status: New → Confirmed
importance: Undecided → Low
tags: added: low-hanging-fruit volume
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Rongze Zhu (zrzhit)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
assignee: nobody → Rongze Zhu (zrzhit)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/11402
Committed: http://github.com/openstack/nova/commit/7419999c4ffd2cddaa82b09c4d0d4f4dc29efcb8
Submitter: Jenkins
Branch: master

commit 7419999c4ffd2cddaa82b09c4d0d4f4dc29efcb8
Author: Rongze Zhu <email address hidden>
Date: Wed Aug 15 13:37:03 2012 +0000

    Remove logging in volume tests

    Fixes bug #932137

    Usage of logging seems to be limited to the check_for_export() tests and
    should be to cleanup. check_for_export() raises an exception if there's
    a problem and it does nothing if it succeeds. The tests should just
    check whether an exception was raised.

    Change-Id: I411948031baeb7e36e6b15b9f31446a100da77d7

Changed in nova:
status: In Progress → Fix Committed
Changed in cinder:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/11549
Committed: http://github.com/openstack/cinder/commit/e958531929e04364759a721a689665ef891ff623
Submitter: Jenkins
Branch: master

commit e958531929e04364759a721a689665ef891ff623
Author: RongzeZhu <email address hidden>
Date: Fri Aug 17 22:24:43 2012 +0800

    Remove logging in volume tests

    Fixes bug #932137

    Usage of logging seems to be limited to the check_for_export() tests and
    should be to cleanup. check_for_export() raises an exception if there's
    a problem and it does nothing if it succeeds. The tests should just
    check whether an exception was raised.

    Change-Id: I72bc3d97aa75950c7f31fae03535c541059501c2

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → folsom-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: none → folsom-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: folsom-rc1 → 2012.2
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-rc1 → 2012.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.