From: Rishabh Dave Date: Fri, 6 Dec 2019 07:40:35 +0000 (+0530) Subject: ceph-volume: delete test_lvs_list_is_created_just_once X-Git-Tag: v13.2.9~43^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6f6d13c49f0a3e062974fced6351a8232b763bd9;p=ceph.git ceph-volume: delete test_lvs_list_is_created_just_once lisitng.py doesn't call api.Volumes anymore. Therefore, this test is redundant. Signed-off-by: Rishabh Dave (cherry picked from commit 665ed2424b7bef4160289f0135acc015f8ea9980) --- diff --git a/src/ceph-volume/ceph_volume/tests/devices/lvm/test_listing.py b/src/ceph-volume/ceph_volume/tests/devices/lvm/test_listing.py index bd460cc0e817d..0ca6992203f28 100644 --- a/src/ceph-volume/ceph_volume/tests/devices/lvm/test_listing.py +++ b/src/ceph-volume/ceph_volume/tests/devices/lvm/test_listing.py @@ -86,24 +86,6 @@ class TestList(object): with pytest.raises(SystemExit): lvm.listing.List([]).list(args) - def test_lvs_list_is_created_just_once(self, monkeypatch, is_root, volumes, factory): - api.volumes_obj_create_count = 0 - - def monkey_populate(self): - api.volumes_obj_create_count += 1 - for lv_item in api.get_api_lvs(): - self.append(api.Volume(**lv_item)) - monkeypatch.setattr(api.Volumes, '_populate', monkey_populate) - - args = factory(format='pretty', device='/dev/sda1') - with pytest.raises(SystemExit): - lvm.listing.List([]).list(args) - - # XXX: Ideally, the count should be just 1. Volumes._populate() is - # being called thrice out of which only twice is moneky_populate. - assert api.volumes_obj_create_count == 2 - - class TestFullReport(object): def test_no_ceph_lvs(self, volumes, monkeypatch):