From 9b36a8bf8d471047dc94cdfcac1f84a9802b9fc5 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Thu, 19 Oct 2017 09:49:25 -0400 Subject: [PATCH] ceph-volume tests update api.lvm tests The create_lv signature changed to require full size description and tags need to be an actual dictionary (vs. keyword args) Signed-off-by: Alfredo Deza (cherry picked from commit e8a18637531cde59d73a97d106958489c1d12117) --- src/ceph-volume/ceph_volume/tests/api/test_lvm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 2d252e58ba526..8d96c5d694241 100644 --- a/src/ceph-volume/ceph_volume/tests/api/test_lvm.py +++ b/src/ceph-volume/ceph_volume/tests/api/test_lvm.py @@ -334,7 +334,7 @@ class TestCreateLV(object): monkeypatch.setattr(process, 'run', capture) monkeypatch.setattr(process, 'call', capture) monkeypatch.setattr(api, 'get_lv', lambda *a, **kw: self.foo_volume) - api.create_lv('foo', 'foo_group', size=5, type='data') + api.create_lv('foo', 'foo_group', size='5G', tags={'ceph.type': 'data'}) expected = ['sudo', 'lvcreate', '--yes', '-L', '5G', '-n', 'foo', 'foo_group'] assert capture.calls[0]['args'][0] == expected @@ -342,7 +342,7 @@ class TestCreateLV(object): monkeypatch.setattr(process, 'run', capture) monkeypatch.setattr(process, 'call', capture) monkeypatch.setattr(api, 'get_lv', lambda *a, **kw: self.foo_volume) - api.create_lv('foo', 'foo_group', size=5, type='data') + api.create_lv('foo', 'foo_group', size='5G', tags={'ceph.type': 'data'}) ceph_tag = ['sudo', 'lvchange', '--addtag', 'ceph.type=data', '/path'] assert capture.calls[1]['args'][0] == ceph_tag @@ -350,6 +350,6 @@ class TestCreateLV(object): monkeypatch.setattr(process, 'run', capture) monkeypatch.setattr(process, 'call', capture) monkeypatch.setattr(api, 'get_lv', lambda *a, **kw: self.foo_volume) - api.create_lv('foo', 'foo_group', size=5, type='data') + api.create_lv('foo', 'foo_group', size='5G', tags={'ceph.type': 'data'}) data_tag = ['sudo', 'lvchange', '--addtag', 'ceph.data_device=/path', '/path'] assert capture.calls[2]['args'][0] == data_tag -- 2.39.5