]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/rbd: add config_image_set/get/remove test case 29459/head
authorzhengyin <zhengyin@cmss.chinamobile.com>
Fri, 2 Aug 2019 07:57:12 +0000 (03:57 -0400)
committerzhengyin <zhengyin@cmss.chinamobile.com>
Thu, 22 Aug 2019 06:04:57 +0000 (02:04 -0400)
Signed-off-by: Zheng Yin <zhengyin@cmss.chinamobile.com>
src/test/pybind/test_rbd.py

index 0742ab8069c6f49dc285b7f764ce1a33ceaf6088..86a7a99b4df0c7ac886e7f772f970ecc98a67d4d 100644 (file)
@@ -1137,6 +1137,20 @@ class TestImage(object):
             for option in image.config_list():
                 eq(option['source'], RBD_CONFIG_SOURCE_CONFIG)
 
+    def test_image_config_set_and_get_and_remove(self):
+        with Image(ioctx, image_name) as image:
+            for option in image.config_list():
+                eq(option['source'], RBD_CONFIG_SOURCE_CONFIG)
+
+            image.config_set("rbd_request_timed_out_seconds", "100")
+            modify_value = image.config_get("rbd_request_timed_out_seconds")
+            eq(modify_value, '100')
+
+            image.config_remove("rbd_request_timed_out_seconds")
+
+            for option in image.config_list():
+                eq(option['source'], RBD_CONFIG_SOURCE_CONFIG)
+
     def test_sparsify(self):
         assert_raises(InvalidArgument, self.image.sparsify, 16)
         self.image.sparsify(4096)