]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: Implement self_test() method in MgrModule
authorWido den Hollander <wido@42on.com>
Mon, 3 Jul 2017 12:48:06 +0000 (14:48 +0200)
committerWido den Hollander <wido@42on.com>
Mon, 3 Jul 2017 12:48:06 +0000 (14:48 +0200)
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 <wido@42on.com>
src/pybind/mgr/mgr_module.py

index cf7fff949d744bf59b06a13e7169594a2918bfee..2e4ba6b142c9c68ee4d4ad2dd40bf244a08aae2d 100644 (file)
@@ -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