Port all changes from github
Change-Id: Ie78388290ad2780074327c26508cdce73805f0da
diff --git a/cvp_checks/tests/test_rabbit_cluster.py b/cvp_checks/tests/test_rabbit_cluster.py
index eb2666f..daae7ce 100644
--- a/cvp_checks/tests/test_rabbit_cluster.py
+++ b/cvp_checks/tests/test_rabbit_cluster.py
@@ -1,7 +1,10 @@
+from cvp_checks import utils
+
+
def test_checking_rabbitmq_cluster(local_salt_client):
# disable config for this test
# it may be reintroduced in future
- # config = utils.get_configuration(__file__)
+ config = utils.get_configuration()
# request pillar data from rmq nodes
rabbitmq_pillar_data = local_salt_client.cmd(
'rabbitmq:server', 'pillar.data',
@@ -10,15 +13,17 @@
# with required cluster size for each node
control_dict = {}
required_cluster_size_dict = {}
- for node in rabbitmq_pillar_data:
- cluster_size_from_the_node = len(
- rabbitmq_pillar_data[node]['rabbitmq:cluster']['members'])
- required_cluster_size_dict.update({node: cluster_size_from_the_node})
-
# request actual data from rmq nodes
rabbit_actual_data = local_salt_client.cmd(
'rabbitmq:server', 'cmd.run',
['rabbitmqctl cluster_status'], expr_form='pillar')
+ for node in rabbitmq_pillar_data:
+ if node in config.get('skipped_nodes'):
+ del rabbit_actual_data[node]
+ continue
+ cluster_size_from_the_node = len(
+ rabbitmq_pillar_data[node]['rabbitmq:cluster']['members'])
+ required_cluster_size_dict.update({node: cluster_size_from_the_node})
# find actual cluster size for each node
for node in rabbit_actual_data: