From: Alfredo Deza Date: Tue, 13 Nov 2018 22:05:31 +0000 (-0500) Subject: ceph-volume tests.api verify that Volume object can be removed X-Git-Tag: v14.1.0~928^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9527cffbe335043f7c5a60162138dfe093ae51da;p=ceph-ci.git ceph-volume tests.api verify that Volume object can be removed Signed-off-by: Alfredo Deza --- diff --git a/src/ceph-volume/ceph_volume/tests/api/test_lvm.py b/src/ceph-volume/ceph_volume/tests/api/test_lvm.py index e087e55ee3e..3dc1ac6b98a 100644 --- a/src/ceph-volume/ceph_volume/tests/api/test_lvm.py +++ b/src/ceph-volume/ceph_volume/tests/api/test_lvm.py @@ -541,6 +541,12 @@ class TestRemoveLV(object): monkeypatch.setattr(process, 'call', mock_call) assert api.remove_lv("vg/lv") + def test_removes_lv_object(self, fake_call): + foo_volume = api.Volume(lv_name='foo', lv_path='/path', vg_name='foo_group', lv_tags='') + api.remove_lv(foo_volume) + # last argument from the list passed to process.call + assert fake_call.calls[0]['args'][0][-1] == '/path' + def test_fails_to_remove_lv(self, monkeypatch): def mock_call(cmd, **kw): return ('', '', 1)