rbd: Get rbd_utils unit tests running again

Awhile back, change I25baf5edd25d9e551686b7ed317a63fd778be533 moved
rbd_utils out from the libvirt driver and into a central location under
nova/storage. This move missed adding a __init__.py file under
nova/tests/unit/storage, so unit test discovery wasn't picking up the
rbd_utils tests and couldn't run them.

This adds a __init__.py file under nova/tests/unit/storage to get the
tests running again.

This also fixes a small bug introduced by change
I3032bbe6bd2d6acc9ba0f0cac4d00ed4b4464ceb in RbdTestCase.setUp() that
passed nonexistent self.images_rbd_pool to self.flags. It should be
self.rbd_pool.

Closes-Bug: #1928007

Change-Id: Ic03a5336abdced883f62f395690c0feac12075c8
This commit is contained in:
melanie witt 2021-05-10 17:31:25 +00:00
parent 7953c0197d
commit 8b647f1b3f
2 changed files with 1 additions and 1 deletions

View File

View File

@ -110,7 +110,7 @@ class RbdTestCase(test.NoDBTestCase):
self.rbd_pool = 'rbd'
self.rbd_connect_timeout = 5
self.flags(
images_rbd_pool=self.images_rbd_pool,
images_rbd_pool=self.rbd_pool,
images_rbd_ceph_conf='/foo/bar.conf',
rbd_connect_timeout=self.rbd_connect_timeout,
rbd_user='foo', group='libvirt')