← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1357751] [NEW] nova.tests.network.test_manager.AllocateTestCase should use mock

 

Public bug reported:

Unit tests should not need to start services. Instead, they should
simply mock out the specific calls out of the unit of code that is being
tested.

nova.tests.network.test_manager.AllocateTestCase calls
self.start_service() for the conductor, network, and compute service,
and it does so unnecessarily. This results in long test run times and
tests that are affected by side effects.

Remove the calls to self.start_service() and replace with proper use of
mock.

** Affects: nova
     Importance: Low
         Status: Triaged


** Tags: unit-tests

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1357751

Title:
  nova.tests.network.test_manager.AllocateTestCase should use mock

Status in OpenStack Compute (Nova):
  Triaged

Bug description:
  Unit tests should not need to start services. Instead, they should
  simply mock out the specific calls out of the unit of code that is
  being tested.

  nova.tests.network.test_manager.AllocateTestCase calls
  self.start_service() for the conductor, network, and compute service,
  and it does so unnecessarily. This results in long test run times and
  tests that are affected by side effects.

  Remove the calls to self.start_service() and replace with proper use
  of mock.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1357751/+subscriptions


Follow ups

References