Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 1 | import pytest |
| 2 | |
| 3 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 4 | @pytest.mark.smoke |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 5 | @pytest.mark.usefixtures('check_openstack') |
| 6 | def test_ui_horizon(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 7 | IP = local_salt_client.pillar_get( |
| 8 | tgt='horizon:server', |
| 9 | param='_param:cluster_public_host') |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 10 | proto = local_salt_client.pillar_get( |
| 11 | param='_param:cluster_public_protocol') |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 12 | if not IP: |
mkraynov | e940404 | 2018-12-04 10:42:41 +0400 | [diff] [blame] | 13 | pytest.skip("Horizon is not enabled on this environment") |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 14 | result = local_salt_client.cmd_any( |
| 15 | tgt=ctl_nodes_pillar, |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 16 | param='curl -k {0}://{1}/auth/login/ 2>&1 | \ |
| 17 | grep Login'.format(proto, IP), |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 18 | expr_form='pillar') |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 19 | assert len(result) != 0, \ |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 20 | 'Horizon login page is not reachable on {} from ctl nodes'.format( |
| 21 | IP[0]) |
| 22 | |
| 23 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 24 | @pytest.mark.smoke |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 25 | @pytest.mark.usefixtures('check_openstack') |
| 26 | def test_public_openstack(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 27 | IP = local_salt_client.pillar_get(param='_param:cluster_public_host') |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 28 | proto = local_salt_client.pillar_get( |
| 29 | param='_param:cluster_public_protocol') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 30 | port = '5000' |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 31 | url = "{}://{}:{}/v3".format(proto, IP, port) |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 32 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 33 | tgt=ctl_nodes_pillar, |
| 34 | param='curl -k {}/ 2>&1 | \ |
| 35 | grep stable'.format(url), |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 36 | expr_form='pillar') |
| 37 | assert len(result[result.keys()[0]]) != 0, \ |
| 38 | 'Public Openstack url is not reachable on {} from ctl nodes'.format(url) |
| 39 | |
| 40 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 41 | @pytest.mark.sl_dup |
| 42 | #stacklight-pytest? |
| 43 | @pytest.mark.full |
Oleksii Zhurba | 8ce9fcf | 2018-10-05 18:38:22 +0300 | [diff] [blame] | 44 | @pytest.mark.usefixtures('check_kibana') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 45 | def test_internal_ui_kibana(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 46 | IP = local_salt_client.pillar_get(param='_param:stacklight_log_address') |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 47 | ssl = local_salt_client.pillar_get( |
| 48 | tgt='kibana:server', |
| 49 | param='haproxy:proxy:listen:kibana:binds:ssl:enabled') |
| 50 | proto = "https" if ssl == "True" else "http" |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 51 | port = '5601' |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 52 | url = "{}://{}:{}".format(proto, IP, port) |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 53 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 54 | tgt=ctl_nodes_pillar, |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 55 | param='curl -k {}/app/kibana 2>&1 | \ |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 56 | grep loading'.format(url), |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 57 | expr_form='pillar') |
| 58 | assert len(result[result.keys()[0]]) != 0, \ |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 59 | 'Internal Kibana login page is not reachable on {} ' \ |
| 60 | 'from ctl nodes'.format(url) |
| 61 | |
| 62 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 63 | @pytest.mark.smoke |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 64 | @pytest.mark.usefixtures('check_kibana') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 65 | def test_public_ui_kibana(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 66 | IP = local_salt_client.pillar_get(param='_param:cluster_public_host') |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 67 | proto = local_salt_client.pillar_get( |
| 68 | param='_param:cluster_public_protocol') |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 69 | port = '5601' |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 70 | url = "{}://{}:{}".format(proto, IP, port) |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 71 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 72 | tgt=ctl_nodes_pillar, |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 73 | param='curl -k {}/app/kibana 2>&1 | \ |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 74 | grep loading'.format(url), |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 75 | expr_form='pillar') |
| 76 | assert len(result[result.keys()[0]]) != 0, \ |
| 77 | 'Public Kibana login page is not reachable on {} ' \ |
| 78 | 'from ctl nodes'.format(url) |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 79 | |
| 80 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 81 | @pytest.mark.sl_dup |
| 82 | #stacklight-pytest? |
| 83 | @pytest.mark.full |
Oleksii Zhurba | 8ce9fcf | 2018-10-05 18:38:22 +0300 | [diff] [blame] | 84 | @pytest.mark.usefixtures('check_prometheus') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 85 | def test_internal_ui_prometheus(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 86 | IP = local_salt_client.pillar_get(param='_param:stacklight_monitor_address') |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 87 | protocol = 'http' |
| 88 | port = '15010' |
| 89 | url = "{}://{}:{}".format(protocol, IP, port) |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 90 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 91 | tgt=ctl_nodes_pillar, |
| 92 | param='curl {}/graph 2>&1 | \ |
| 93 | grep Prometheus'.format(url), |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 94 | expr_form='pillar') |
| 95 | assert len(result[result.keys()[0]]) != 0, \ |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 96 | 'Internal Prometheus page is not reachable on {} ' \ |
| 97 | 'from ctl nodes'.format(url) |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 98 | |
| 99 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 100 | @pytest.mark.smoke |
Oleksii Zhurba | 8ce9fcf | 2018-10-05 18:38:22 +0300 | [diff] [blame] | 101 | @pytest.mark.usefixtures('check_prometheus') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 102 | def test_public_ui_prometheus(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 103 | IP = local_salt_client.pillar_get(param='_param:cluster_public_host') |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 104 | proto = local_salt_client.pillar_get( |
| 105 | param='_param:cluster_public_protocol') |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 106 | port = '15010' |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 107 | url = "{}://{}:{}".format(proto, IP, port) |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 108 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 109 | tgt=ctl_nodes_pillar, |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 110 | param='curl -k {}/graph 2>&1 | \ |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 111 | grep Prometheus'.format(url), |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 112 | expr_form='pillar') |
| 113 | assert len(result[result.keys()[0]]) != 0, \ |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 114 | 'Public Prometheus page is not reachable on {} ' \ |
| 115 | 'from ctl nodes'.format(url) |
| 116 | |
| 117 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 118 | @pytest.mark.sl_dup |
| 119 | #stacklight-pytest? |
| 120 | @pytest.mark.full |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 121 | @pytest.mark.usefixtures('check_prometheus') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 122 | def test_internal_ui_alert_manager(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 123 | IP = local_salt_client.pillar_get(param='_param:stacklight_monitor_address') |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 124 | protocol = 'http' |
| 125 | port = '15011' |
| 126 | url = "{}://{}:{}".format(protocol, IP, port) |
| 127 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 128 | tgt=ctl_nodes_pillar, |
| 129 | param='curl -s {}/ | grep Alertmanager'.format(url), |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 130 | expr_form='pillar') |
| 131 | assert len(result[result.keys()[0]]) != 0, \ |
| 132 | 'Internal AlertManager page is not reachable on {} ' \ |
| 133 | 'from ctl nodes'.format(url) |
| 134 | |
| 135 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 136 | @pytest.mark.smoke |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 137 | @pytest.mark.usefixtures('check_prometheus') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 138 | def test_public_ui_alert_manager(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 139 | IP = local_salt_client.pillar_get(param='_param:cluster_public_host') |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 140 | proto = local_salt_client.pillar_get( |
| 141 | param='_param:cluster_public_protocol') |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 142 | port = '15011' |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 143 | url = "{}://{}:{}".format(proto, IP, port) |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 144 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 145 | tgt=ctl_nodes_pillar, |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 146 | param='curl -k -s {}/ | grep Alertmanager'.format(url), |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 147 | expr_form='pillar') |
| 148 | assert len(result[result.keys()[0]]) != 0, \ |
| 149 | 'Public AlertManager page is not reachable on {} ' \ |
| 150 | 'from ctl nodes'.format(url) |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 151 | |
| 152 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 153 | @pytest.mark.sl_dup |
| 154 | #stacklight-pytest? |
| 155 | @pytest.mark.full |
Oleksii Zhurba | 8ce9fcf | 2018-10-05 18:38:22 +0300 | [diff] [blame] | 156 | @pytest.mark.usefixtures('check_grafana') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 157 | def test_internal_ui_grafana(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 158 | IP = local_salt_client.pillar_get(param='_param:stacklight_monitor_address') |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 159 | protocol = 'http' |
| 160 | port = '15013' |
| 161 | url = "{}://{}:{}".format(protocol, IP, port) |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 162 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 163 | tgt=ctl_nodes_pillar, |
| 164 | param='curl {}/login 2>&1 | grep Grafana'.format(url), |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 165 | expr_form='pillar') |
| 166 | assert len(result[result.keys()[0]]) != 0, \ |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 167 | 'Internal Grafana page is not reachable on {} ' \ |
| 168 | 'from ctl nodes'.format(url) |
| 169 | |
| 170 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 171 | @pytest.mark.smoke |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 172 | @pytest.mark.usefixtures('check_grafana') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 173 | def test_public_ui_grafana(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 174 | IP = local_salt_client.pillar_get(param='_param:cluster_public_host') |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 175 | proto = local_salt_client.pillar_get( |
| 176 | param='_param:cluster_public_protocol') |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 177 | port = '8084' |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 178 | url = "{}://{}:{}".format(proto, IP, port) |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 179 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 180 | tgt=ctl_nodes_pillar, |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 181 | param='curl -k {}/login 2>&1 | grep Grafana'.format(url), |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 182 | expr_form='pillar') |
| 183 | assert len(result[result.keys()[0]]) != 0, \ |
| 184 | 'Public Grafana page is not reachable on {} from ctl nodes'.format(url) |
Ievgeniia Zadorozhna | df243ef | 2018-11-08 18:17:17 +0300 | [diff] [blame] | 185 | |
| 186 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 187 | @pytest.mark.sl_dup |
| 188 | #stacklight-pytest? |
| 189 | @pytest.mark.full |
Ievgeniia Zadorozhna | df243ef | 2018-11-08 18:17:17 +0300 | [diff] [blame] | 190 | @pytest.mark.usefixtures('check_alerta') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 191 | def test_internal_ui_alerta(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 192 | IP = local_salt_client.pillar_get(param='_param:stacklight_monitor_address') |
Ievgeniia Zadorozhna | df243ef | 2018-11-08 18:17:17 +0300 | [diff] [blame] | 193 | protocol = 'http' |
| 194 | port = '15017' |
| 195 | url = "{}://{}:{}".format(protocol, IP, port) |
| 196 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 197 | tgt=ctl_nodes_pillar, |
| 198 | param='curl {}/ 2>&1 | \ |
| 199 | grep Alerta'.format(url), |
Ievgeniia Zadorozhna | df243ef | 2018-11-08 18:17:17 +0300 | [diff] [blame] | 200 | expr_form='pillar') |
| 201 | assert len(result[result.keys()[0]]) != 0, \ |
| 202 | 'Internal Alerta page is not reachable on {} from ctl nodes'.format(url) |
| 203 | |
| 204 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 205 | @pytest.mark.smoke |
Ievgeniia Zadorozhna | df243ef | 2018-11-08 18:17:17 +0300 | [diff] [blame] | 206 | @pytest.mark.usefixtures('check_alerta') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 207 | def test_public_ui_alerta(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 208 | IP = local_salt_client.pillar_get(param='_param:cluster_public_host') |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 209 | proto = local_salt_client.pillar_get( |
| 210 | param='_param:cluster_public_protocol') |
Ievgeniia Zadorozhna | df243ef | 2018-11-08 18:17:17 +0300 | [diff] [blame] | 211 | port = '15017' |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 212 | url = "{}://{}:{}".format(proto, IP, port) |
Ievgeniia Zadorozhna | df243ef | 2018-11-08 18:17:17 +0300 | [diff] [blame] | 213 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 214 | tgt=ctl_nodes_pillar, |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 215 | param='curl -k {}/ 2>&1 | \ |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 216 | grep Alerta'.format(url), |
Ievgeniia Zadorozhna | df243ef | 2018-11-08 18:17:17 +0300 | [diff] [blame] | 217 | expr_form='pillar') |
| 218 | assert len(result[result.keys()[0]]) != 0, \ |
| 219 | 'Public Alerta page is not reachable on {} from ctl nodes'.format(url) |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 220 | |
| 221 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 222 | @pytest.mark.smoke |
Oleksii Zhurba | bcb27cd | 2019-04-23 17:04:20 -0500 | [diff] [blame] | 223 | @pytest.mark.usefixtures('check_openstack') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 224 | @pytest.mark.usefixtures('check_drivetrain') |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 225 | def test_public_ui_jenkins(local_salt_client, ctl_nodes_pillar): |
| 226 | IP = local_salt_client.pillar_get(param='_param:cluster_public_host') |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 227 | proto = local_salt_client.pillar_get( |
| 228 | param='_param:cluster_public_protocol') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 229 | port = '8081' |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 230 | url = "{}://{}:{}".format(proto, IP, port) |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 231 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 232 | tgt=ctl_nodes_pillar, |
| 233 | param='curl -k {}/ 2>&1 | \ |
| 234 | grep Authentication'.format(url), |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 235 | expr_form='pillar') |
| 236 | assert len(result[result.keys()[0]]) != 0, \ |
| 237 | 'Public Jenkins page is not reachable on {} from ctl nodes'.format(url) |
| 238 | |
| 239 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 240 | @pytest.mark.smoke |
Oleksii Zhurba | bcb27cd | 2019-04-23 17:04:20 -0500 | [diff] [blame] | 241 | @pytest.mark.usefixtures('check_openstack') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 242 | @pytest.mark.usefixtures('check_drivetrain') |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 243 | def test_public_ui_gerrit(local_salt_client, ctl_nodes_pillar): |
| 244 | IP = local_salt_client.pillar_get(param='_param:cluster_public_host') |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 245 | proto = local_salt_client.pillar_get( |
| 246 | param='_param:cluster_public_protocol') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 247 | port = '8070' |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 248 | url = "{}://{}:{}".format(proto, IP, port) |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 249 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 250 | tgt=ctl_nodes_pillar, |
| 251 | param='curl -k {}/ 2>&1 | \ |
| 252 | grep "Gerrit Code Review"'.format(url), |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 253 | expr_form='pillar') |
| 254 | assert len(result[result.keys()[0]]) != 0, \ |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame^] | 255 | 'Public Gerrit page is not reachable on {} from ctl nodes'.format(url) |