]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/rbd: add pool config_set/get/remove test case 30865/head
authorzhengyin <zhengyin@cmss.chinamobile.com>
Fri, 11 Oct 2019 10:15:32 +0000 (18:15 +0800)
committerzhengyin <zhengyin@cmss.chinamobile.com>
Fri, 11 Oct 2019 10:15:32 +0000 (18:15 +0800)
Signed-off-by: Zheng Yin <zhengyin@cmss.chinamobile.com>
src/test/pybind/test_rbd.py

index 1f2a5b8ddd862d0a54aabc1e6a85937b6c90d65e..ab0992669ccb48d0b3130b452bff77d95665da7f 100644 (file)
@@ -407,6 +407,20 @@ def test_config_list():
     for option in rbd.config_list(ioctx):
         eq(option['source'], RBD_CONFIG_SOURCE_CONFIG)
 
+def test_pool_config_set_and_get_and_remove():
+    rbd = RBD()
+
+    for option in rbd.config_list(ioctx):
+        eq(option['source'], RBD_CONFIG_SOURCE_CONFIG)
+
+    rbd.config_set(ioctx, "rbd_request_timed_out_seconds", "100")
+    new_value = rbd.config_get(ioctx, "rbd_request_timed_out_seconds")
+    eq(new_value, "100")
+    rbd.config_remove(ioctx, "rbd_request_timed_out_seconds")
+
+    for option in rbd.config_list(ioctx):
+        eq(option['source'], RBD_CONFIG_SOURCE_CONFIG)
+
 def test_namespaces():
     rbd = RBD()