]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/pybind/test_rados.py: expand test_xattrs/test_obj_xattrs 20260/head
authorGu Zhongyan <guzhongyan@360.cn>
Mon, 5 Feb 2018 04:14:42 +0000 (12:14 +0800)
committerGu Zhongyan <guzhongyan@360.cn>
Mon, 5 Feb 2018 04:14:42 +0000 (12:14 +0800)
to cover attribute with empty value case.

Signed-off-by: Gu Zhongyan <guzhongyan@360.cn>
src/test/pybind/test_rados.py

index eeb6f58a344ff980d19c430479d5811a1114169a..378fdf08cb29dc339735a5bd90be939ef30e5a3c 100644 (file)
@@ -370,7 +370,7 @@ class TestIoctx(object):
                 ('ns1', 'ns1-c'), ('ns1', 'ns1-d')])
 
     def test_xattrs(self):
-        xattrs = dict(a=b'1', b=b'2', c=b'3', d=b'a\0b', e=b'\0')
+        xattrs = dict(a=b'1', b=b'2', c=b'3', d=b'a\0b', e=b'\0', f='')
         self.ioctx.write('abc', b'')
         for key, value in xattrs.items():
             self.ioctx.set_xattr('abc', key, value)
@@ -381,7 +381,7 @@ class TestIoctx(object):
         eq(stored_xattrs, xattrs)
 
     def test_obj_xattrs(self):
-        xattrs = dict(a=b'1', b=b'2', c=b'3', d=b'a\0b', e=b'\0')
+        xattrs = dict(a=b'1', b=b'2', c=b'3', d=b'a\0b', e=b'\0', f='')
         self.ioctx.write('abc', b'')
         obj = list(self.ioctx.list_objects())[0]
         for key, value in xattrs.items():