From: Alfredo Deza Date: Mon, 4 Dec 2017 14:56:00 +0000 (-0500) Subject: ceph-volume tests.api ensure that we can handle non-ceph tags in lvs X-Git-Tag: v13.0.2~873^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F19321%2Fhead;p=ceph.git ceph-volume tests.api ensure that we can handle non-ceph tags in lvs Signed-off-by: Alfredo Deza --- 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 3639f01e5de5..2f6e8b48efc8 100644 --- a/src/ceph-volume/ceph_volume/tests/api/test_lvm.py +++ b/src/ceph-volume/ceph_volume/tests/api/test_lvm.py @@ -13,6 +13,14 @@ class TestParseTags(object): result = api.parse_tags('ceph.osd_something=1') assert result == {'ceph.osd_something': '1'} + def test_non_ceph_tags_are_skipped(self): + result = api.parse_tags('foo') + assert result == {} + + def test_mixed_non_ceph_tags(self): + result = api.parse_tags('foo,ceph.bar=1') + assert result == {'ceph.bar': '1'} + def test_multiple_csv_expands_in_dict(self): result = api.parse_tags('ceph.osd_something=1,ceph.foo=2,ceph.fsid=0000') # assert them piecemeal to avoid the un-ordered dict nature