first commit!
diff --git a/cvp_checks/tests/test_galera_cluster.py b/cvp_checks/tests/test_galera_cluster.py
new file mode 100644
index 0000000..d2b2d5f
--- /dev/null
+++ b/cvp_checks/tests/test_galera_cluster.py
@@ -0,0 +1,17 @@
+def test_galera_cluster_status(local_salt_client):
+ gs = local_salt_client.cmd(
+ 'I@galera:*',
+ 'cmd.run',
+ ['salt-call mysql.status | grep -A1 wsrep_cluster_size | tail -n1'],
+ expr_form='pillar')
+
+ size_cluster = []
+ amount = len(gs)
+
+ for item in gs.values():
+ size_cluster.append(item.split('\n')[-1].strip())
+
+ assert all(item == str(amount) for item in size_cluster), \
+ '''There found inconsistency within cloud. MySQL galera cluster
+ is probably broken, the cluster size gathered from nodes:
+ {}'''.format(gs)