]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume tests.api ensure that we can handle non-ceph tags in lvs 19528/head
authorAlfredo Deza <adeza@redhat.com>
Mon, 4 Dec 2017 14:56:00 +0000 (09:56 -0500)
committerAlfredo Deza <adeza@redhat.com>
Thu, 14 Dec 2017 16:55:37 +0000 (11:55 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit c98731ecede09d8d15dca99c57e331212747060e)

src/ceph-volume/ceph_volume/tests/api/test_lvm.py

index 3639f01e5de597c4628465164b6ac05413f77ec5..2f6e8b48efc820deff16b568e17f5cdeb5726886 100644 (file)
@@ -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