Add more public url tests for UIs
Related-PROD: PROD-23746
Change-Id: Ie680d0d934cf36f4147b9d9a079f53469d26eccc
diff --git a/test_set/cvp-sanity/tests/test_contrail.py b/test_set/cvp-sanity/tests/test_contrail.py
index 5e7e108..e5722bd 100644
--- a/test_set/cvp-sanity/tests/test_contrail.py
+++ b/test_set/cvp-sanity/tests/test_contrail.py
@@ -1,5 +1,6 @@
import pytest
import json
+import utils
pytestmark = pytest.mark.usefixtures("contrail")
@@ -85,3 +86,18 @@
'The length of vRouters {} differs' \
' from the length of compute nodes {}'.format(actual_vrouter_count,
len(cs.keys()))
+
+
+def test_public_ui_contrail(local_salt_client, ctl_nodes_pillar):
+ IP = utils.get_monitoring_ip('cluster_public_host')
+ protocol = 'https'
+ port = '8143'
+ url = "{}://{}:{}".format(protocol, IP, port)
+ result = local_salt_client.cmd(
+ ctl_nodes_pillar,
+ 'cmd.run',
+ ['curl -k {}/ 2>&1 | \
+ grep Contrail'.format(url)],
+ expr_form='pillar')
+ assert len(result[result.keys()[0]]) != 0, \
+ 'Public Contrail UI is not reachable on {} from ctl nodes'.format(url)