From 4361de55daf36098cada837c7cdc6bf7dd42809b Mon Sep 17 00:00:00 2001 From: Jan Fajerski Date: Tue, 22 Dec 2020 15:44:10 +0100 Subject: [PATCH] ceph-volume: mock VGs with string properties in tests The real things uses string properties as well. Signed-off-by: Jan Fajerski (cherry picked from commit c4bbb1b999b08bd84d793537f2602fc8e4c93bae) --- src/ceph-volume/ceph_volume/tests/api/test_lvm.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 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 fe7426f4fd506..f01ceb4f337a5 100644 --- a/src/ceph-volume/ceph_volume/tests/api/test_lvm.py +++ b/src/ceph-volume/ceph_volume/tests/api/test_lvm.py @@ -185,9 +185,9 @@ class TestCreateLV(object): def setup(self): self.foo_volume = api.Volume(lv_name='foo', lv_path='/path', vg_name='foo_group', lv_tags='') self.foo_group = api.VolumeGroup(vg_name='foo_group', - vg_extent_size=4194304, - vg_extent_count=100, - vg_free_count=100) + vg_extent_size="4194304", + vg_extent_count="100", + vg_free_count="100") @patch('ceph_volume.api.lvm.process.run') @patch('ceph_volume.api.lvm.process.call') @@ -204,9 +204,9 @@ class TestCreateLV(object): def test_uses_size_adjust_if_1percent_over(self, m_get_first_lv, m_call, m_run, monkeypatch): foo_volume = api.Volume(lv_name='foo', lv_path='/path', vg_name='foo_group', lv_tags='') foo_group = api.VolumeGroup(vg_name='foo_group', - vg_extent_size=4194304, - vg_extent_count=1000, - vg_free_count=1000) + vg_extent_size="4194304", + vg_extent_count="1000", + vg_free_count="1000") m_get_first_lv.return_value = foo_volume # 423624704 should be just under 1% off of the available size 419430400 api.create_lv('foo', 0, vg=foo_group, size=4232052736, tags={'ceph.type': 'data'}) -- 2.39.5