redundant _create_instance method in test_compute

Bug #1206993 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Matt Riedemann

Bug Description

nova.tests.compute.test_compute.BaseTestCase has a _create_fake_instance and _create_instance method which do the same thing, and _create_instance simply calls _create_fake_instance(). Furthermore, the docstring on _create_instance is wrong, it says it returns the UUID of the instance when it actually returns the instance reference returned from sqlalchemy. This should be cleaned up so that the tests are only using _create_fake_instance.

https://github.com/openstack/nova/blob/master/nova/tests/compute/test_compute.py#L252

https://github.com/openstack/nova/blob/master/nova/tests/compute/test_compute.py#L295

Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → Low
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/39527

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

Reviewed: https://review.openstack.org/39527
Committed: http://github.com/openstack/nova/commit/39e2318eb483ca853bb479435a2941f9d69021c1
Submitter: Jenkins
Branch: master

commit 39e2318eb483ca853bb479435a2941f9d69021c1
Author: Matt Riedemann <email address hidden>
Date: Tue Jul 30 23:24:10 2013 -0700

    Remove redundant _create_instance method from test_compute

    The _create_instance method in test_compute.BaseTestCase simply calls
    through to _create_fake_instance, so it's redundant. Furthermore, the
    docstring was wrong, it said it returned a UUID when it really returned
    the instance reference. This patch simply removes _create_instance and
    replaces it's usage with _create_fake_instance.

    Fixes bug 1206993

    Change-Id: I3fc42c94691cd0d046f19cdf2110a95b9a125edd

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