From c049d3b79191e51f1530379b146fee6b0dbd3883 Mon Sep 17 00:00:00 2001 From: zhengyin Date: Fri, 11 Oct 2019 18:15:32 +0800 Subject: [PATCH] pybind/rbd: add pool config_set/get/remove test case Signed-off-by: Zheng Yin --- src/test/pybind/test_rbd.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/test/pybind/test_rbd.py b/src/test/pybind/test_rbd.py index 1f2a5b8ddd8..ab0992669cc 100644 --- a/src/test/pybind/test_rbd.py +++ b/src/test/pybind/test_rbd.py @@ -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() -- 2.39.5