From 8f018d754d5c55e432cd51df99278382b527283e Mon Sep 17 00:00:00 2001 From: melanie witt Date: Mon, 10 May 2021 17:31:25 +0000 Subject: [PATCH] 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 (cherry picked from commit 8b647f1b3f56879be221b3925570790a1e0e77f8) --- nova/tests/unit/storage/__init__.py | 0 nova/tests/unit/storage/test_rbd.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 nova/tests/unit/storage/__init__.py diff --git a/nova/tests/unit/storage/__init__.py b/nova/tests/unit/storage/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/nova/tests/unit/storage/test_rbd.py b/nova/tests/unit/storage/test_rbd.py index 5a39bdbd5a46..f0b3f7053206 100644 --- a/nova/tests/unit/storage/test_rbd.py +++ b/nova/tests/unit/storage/test_rbd.py @@ -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')