]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume tests update api.lvm tests
authorAlfredo Deza <adeza@redhat.com>
Thu, 19 Oct 2017 13:49:25 +0000 (09:49 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 20 Oct 2017 16:09:43 +0000 (12:09 -0400)
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 <adeza@redhat.com>
src/ceph-volume/ceph_volume/tests/api/test_lvm.py

index 2d252e58ba526190045c444f53257cd0225d2e11..8d96c5d6942416d5e1330f7e171980a25680f805 100644 (file)
@@ -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