From 9527cffbe335043f7c5a60162138dfe093ae51da Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Tue, 13 Nov 2018 17:05:31 -0500 Subject: [PATCH] ceph-volume tests.api verify that Volume object can be removed Signed-off-by: Alfredo Deza --- src/ceph-volume/ceph_volume/tests/api/test_lvm.py | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.39.5