From: Gu Zhongyan Date: Mon, 5 Feb 2018 04:14:42 +0000 (+0800) Subject: test/pybind/test_rados.py: expand test_xattrs/test_obj_xattrs X-Git-Tag: v12.2.5~80^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cd7946f95efb5850a045814e0271f4e4ac63fa52;p=ceph.git test/pybind/test_rados.py: expand test_xattrs/test_obj_xattrs to cover attribute with empty value case. Signed-off-by: Gu Zhongyan (cherry picked from commit b79107d53afbf8d191780c8048302929cf54ea5d) --- diff --git a/src/test/pybind/test_rados.py b/src/test/pybind/test_rados.py index 88b8d2a92c8c..ca9705cbf73c 100644 --- a/src/test/pybind/test_rados.py +++ b/src/test/pybind/test_rados.py @@ -369,7 +369,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) @@ -380,7 +380,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():