Commit Graph

3 Commits (6abb88befe2914040e3307b0bc5dfd13683db8b2)

Author SHA1 Message Date
Sean Dague c943cbbc40 ensure DatabaseFixture removes db on cleanup
The DatabaseFixture was previously just ensuring that tests which used
it had a clean database when they started. It did not ensure there was
no working database around when it wasn't being used, so tests which
leaked into the database might pass even if they were listed as a
NoDBTest, because there was an in memory test db from a prior run.

This adds a cleanup path to the fixture which blows away the db at the
end of the test (which itself is tested). There were 46 tests which
failed when we got this isolation correct, and this changes all those
test classes containing those tests to require a db. Many of these
could have narrower fixes, but this returns us to an isolated state.

Change-Id: Id0480035d8e615ae602da9737cd2c94bc7967067
Closes-Bug: #1431519
Closes-Bug: #1431551
2015-03-12 16:55:55 -04:00
Mike Durnosvistov 92074e0fde Make unit tests inherit from test.NoDBTestCase
This patch changes, where it's posible, tests-package
to using test.NoDBTestCase saving test case running time.

Co-Authored-By: yuntongjin <>
Change-Id: I95945f0bf23c9ef963a4b8634ac4ed6236d97ac7
2015-03-06 09:46:31 +02:00
Sean Dague 89cd6a0c49 move all tests to nova/tests/unit
As part of the split of functional and unit tests we need to isolate
the unit tests into a separate directory for having multiple test
targets in a sane way.

Part of bp:functional-tests-for-nova

Change-Id: Id42ba373c1bda6a312b673ab2b489ca56da8c628
2014-11-12 15:31:08 -05:00