many unit test cases can NOT be run standalone

Bug #1328796 reported by Lianhao Lu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Low
Lianhao Lu

Bug Description

Intrigued by https://review.openstack.org/#/c/98698/, I did some tests and find out the following unit tests can NOT be run standalone by either testtools or nosetest:

ceilometer.tests.api.v2.test_complex_query
ceilometer.tests.api.v2.test_app
ceilometer.tests.api.v2.test_list_resources_scenarios
ceilometer.tests.api.v2.test_capabilities
ceilometer.tests.api.v2.test_list_meters_scenarios
ceilometer.tests.api.v2.test_complex_query_scenarios
ceilometer.tests.api.v2.test_list_events_scenarios
ceilometer.tests.api.v2.test_post_samples_scenarios
ceilometer.tests.api.v2.test_event_scenarios
ceilometer.tests.api.v2.test_alarm_scenarios
ceilometer.tests.api.v2.test_compute_duration_by_resource_scenarios
ceilometer.tests.api.v2.test_statistics_scenarios
ceilometer.tests.publisher.test_rpc_publisher
ceilometer.tests.test_collector
ceilometer.tests.test_middleware
ceilometer.tests.alarm.test_rpc
ceilometer.tests.alarm.partition.test_coordination
ceilometer.tests.alarm.evaluator.test_threshold
ceilometer.tests.alarm.evaluator.test_combination

Those test cases failed mainly due to the following reasons:
1. forgot the import oslo.config options either in unit test cases or in ceilometer function module
2. incorrect usage import statement in unit test

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

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

Changed in ceilometer:
status: New → In Progress
Lianhao Lu (lianhao-lu)
Changed in ceilometer:
milestone: none → juno-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/99280
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=acf7f5189e8f019a4d080246c59651e90fc0411c
Submitter: Jenkins
Branch: master

commit acf7f5189e8f019a4d080246c59651e90fc0411c
Author: Lianhao Lu <email address hidden>
Date: Wed Jun 11 14:55:54 2014 +0800

    Fixed various import issues exposed by unittest

    Tried running the unit test stand-alone(e.g. using testtools.run), and
    it exposed various 'import' issues about the oslo.config options and the
    modules, in both the test cases themselves and the ceilometer module.
    This patch fixed those import issues.

    Change-Id: I68f30d335ee8d0d63c451116274632287a9ec77f
    Closes-Bug: #1328796

Changed in ceilometer:
status: In Progress → Fix Committed
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: juno-2 → 2014.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.