DB should be empy before runing tests

Bug #1181502 reported by Sergey Skripnick
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Sergey Skripnick

Bug Description

Initial data needed by some tests is creating in constructor of base class for tests (nova.test.TestCase). It should be done only in setUp method of tests where it is needed.

Tags: unittest
Changed in nova:
assignee: nobody → eyerediskin (eyerediskin)
Revision history for this message
Boris Pavlovic (boris-42) wrote :

This blocks bp test-db-api that has high priority

Changed in nova:
importance: Undecided → High
Changed in nova:
status: New → In Progress
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/29639

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

Reviewed: https://review.openstack.org/29639
Committed: http://github.com/openstack/nova/commit/2b92ca1de7ad10d2777ac44b95da55467cca7a21
Submitter: Jenkins
Branch: master

commit 2b92ca1de7ad10d2777ac44b95da55467cca7a21
Author: Sergey Skripnick <email address hidden>
Date: Sat May 18 14:07:03 2013 +0300

    Moved sample network creation out of unittest base class constructor.

    This sample networks only needed in:

     nova.tests.api.ec2.test_cloud
     nova.tests.integrated.test_api_samples
     nova.tests.network.test_manager
     nova.tests.test_libvirt
     nova.tests.test_xenapi

    Moreover, base class constructor is not good place for sample
    data creation. Database should be empty before runing tests.

    Fixes: bug 1181502

    Change-Id: I8dcaa5b36a1da0c0928c9445c556d788d463844e

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