]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/pybind/test_rados.py: expand test_xattrs/test_obj_xattrs 20381/head
authorGu Zhongyan <guzhongyan@360.cn>
Mon, 5 Feb 2018 04:14:42 +0000 (12:14 +0800)
committerPrashant D <pdhange@redhat.com>
Fri, 9 Feb 2018 03:39:12 +0000 (22:39 -0500)
to cover attribute with empty value case.

Signed-off-by: Gu Zhongyan <guzhongyan@360.cn>
(cherry picked from commit b79107d53afbf8d191780c8048302929cf54ea5d)

src/test/pybind/test_rados.py

index 03cf2dd7a14dc7b09f3cde4783bf9ba0a07ed2ce..fecbbc75b9ffc4f6faf724feb04650bf802dabf9 100644 (file)
@@ -363,7 +363,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)
@@ -374,7 +374,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():