Small fixes in test_ui_addresses and test_stacklight
diff --git a/cvp_checks/tests/test_stacklight.py b/cvp_checks/tests/test_stacklight.py
index 02bb7bc..f8806f6 100644
--- a/cvp_checks/tests/test_stacklight.py
+++ b/cvp_checks/tests/test_stacklight.py
@@ -3,8 +3,14 @@
def test_elasticsearch_cluster(local_salt_client):
- assert requests.get('http://log:9200/').status_code == 200, \
- 'Cannot check elasticsearch url. Info:'
+ salt_output = local_salt_client.cmd(
+ 'elasticsearch:client',
+ 'pillar.get',
+ ['_param:haproxy_elasticsearch_bind_host'],
+ expr_form='pillar')
+ IP = salt_output[salt_output.keys()[0]]
+ assert requests.get('http://{}:9200/'.format(IP)).status_code == 200, \
+ 'Cannot check elasticsearch url on {}.'.format(IP)
def test_stacklight_services_replicas(local_salt_client):
@@ -32,6 +38,7 @@
result = {}
for line in salt_output[salt_output.keys()[0]].split('\n')[1:]:
shift = 0
+ print line
if line.split()[1] == '\\_':
shift = 1
if line.split()[1 + shift] not in result.keys():
diff --git a/cvp_checks/tests/test_ui_addresses.py b/cvp_checks/tests/test_ui_addresses.py
index 565da42..91f67de 100644
--- a/cvp_checks/tests/test_ui_addresses.py
+++ b/cvp_checks/tests/test_ui_addresses.py
@@ -6,7 +6,7 @@
salt_output = local_salt_client.cmd(
'horizon:server',
'pillar.get',
- ['_param:openstack_proxy_address'],
+ ['_param:cluster_public_host'],
expr_form='pillar')
IP = [salt_output[node] for node in salt_output
if salt_output[node]]