diff options
author | adityaramteke <adityaramteke05icr@gmail.com> | 2019-03-27 17:24:15 +0530 |
---|---|---|
committer | adityaramteke <adityaramteke05icr@gmail.com> | 2019-04-10 14:57:15 +0530 |
commit | 5f6d8efbe62758ad76bab4a9421d5bcfed220b0c (patch) | |
tree | eea2e7f9389bcc9741c4c6f4404f842a57b74d82 | |
parent | a3d806bf213c6125ccc72805e571f819f539ffa8 (diff) |
add test gluster ops check
Change-Id: I1d9c7e14525ad8de35bfa7be8fffc533c010248b
-rw-r--r-- | tests/functional/test_gluster_ops_check.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/functional/test_gluster_ops_check.py b/tests/functional/test_gluster_ops_check.py new file mode 100644 index 00000000..de20ab00 --- /dev/null +++ b/tests/functional/test_gluster_ops_check.py @@ -0,0 +1,34 @@ +from glustolibs.gluster.brickmux_ops import is_brick_mux_enabled + +from openshiftstoragelibs.baseclass import BaseClass +from openshiftstoragelibs.openshift_ops import cmd_run_on_gluster_pod_or_node +from openshiftstoragelibs import podcmd + + +class TestOpsCheck(BaseClass): + + @podcmd.GlustoPod() + def test_check_bmux_enabled(self): + """Check if the brickmultiplexing is enalbed""" + + bmux_status = is_brick_mux_enabled('auto_get_gluster_endpoint') + + # Validate the result + err_msg = ("Brick multiplex is not enabled") + self.assertTrue(bmux_status, err_msg) + + def test_check_max_brick_per_process(self): + """Check if the max-brick process is set to 250""" + + cmd = ("gluster v get all all | grep cluster.max-bricks-per-process |" + "awk '{print $2}'") + + # Get brick per process value + bprocess_status = cmd_run_on_gluster_pod_or_node( + self.ocp_master_node[0], cmd) + + # Validate the result + err_msg = ("Got unexepeted max-brick process - '%s' " + "Expected max brick process is : 250") % ( + bprocess_status) + self.assertIn(bprocess_status, '250', err_msg) |