]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/python-common/ceph/tests/test_disk_selector.py
import ceph pacific 16.2.5
[ceph.git] / ceph / src / python-common / ceph / tests / test_disk_selector.py
index 579b03f0c5d4974de4621e262cd7e6dfe9c91c11..ab72c431edd36b187533a6084957a484cc2167f0 100644 (file)
@@ -153,6 +153,13 @@ class TestSizeMatcher(object):
         ret = matcher.compare(disk_dict)
         assert ret is True
 
+    def test_compare_exact_decimal(self):
+
+        matcher = drive_selection.SizeMatcher('size', '20.12GB')
+        disk_dict = Device(path='/dev/vdb', sys_api=dict(size='20.12 GB'))
+        ret = matcher.compare(disk_dict)
+        assert ret is True
+
     @pytest.mark.parametrize("test_input,expected", [
         ("1.00 GB", False),
         ("20.00 GB", True),