From 270a3e0f210f9bb84ed9c7ec628bf8362d6f2e88 Mon Sep 17 00:00:00 2001 From: Wido den Hollander Date: Mon, 3 Jul 2017 14:48:06 +0200 Subject: [PATCH] mgr: Implement self_test() method in MgrModule Other modules are encouraged to override this method and implement a as good as possible self-test which returns True or False It should be a simple way of running (automated) testing on a ceph-mgr module Signed-off-by: Wido den Hollander --- src/pybind/mgr/mgr_module.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py index cf7fff949d7..2e4ba6b142c 100644 --- a/src/pybind/mgr/mgr_module.py +++ b/src/pybind/mgr/mgr_module.py @@ -246,3 +246,10 @@ class MgrModule(object): else: return json.loads(raw) + def self_test(self): + """ + Run a self-test on the module. Override this function and implement + a best as possible self-test for (automated) testing of the module + :return: bool + """ + pass -- 2.39.5