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') |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 19 | assert len(result) != 0, ( |
| 20 | 'Horizon login page is not reachable on {} from ctl nodes.'.format(IP)) |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 21 | |
| 22 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 23 | @pytest.mark.smoke |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 24 | @pytest.mark.usefixtures('check_openstack') |
| 25 | def test_public_openstack(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 26 | IP = local_salt_client.pillar_get(param='_param:cluster_public_host') |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame] | 27 | proto = local_salt_client.pillar_get( |
| 28 | param='_param:cluster_public_protocol') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 29 | port = '5000' |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame] | 30 | url = "{}://{}:{}/v3".format(proto, IP, port) |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 31 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 32 | tgt=ctl_nodes_pillar, |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 33 | param='curl -k {}/ 2>&1 | grep stable'.format(url), |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 34 | expr_form='pillar') |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 35 | assert len(result[result.keys()[0]]) != 0, ( |
| 36 | 'Public Openstack url is not reachable on {} from ctl ' |
| 37 | 'nodes'.format(url) |
| 38 | ) |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 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, |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 55 | param='curl -k {}/app/kibana 2>&1 | grep loading'.format(url), |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 56 | expr_form='pillar') |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 57 | assert len(result[result.keys()[0]]) != 0, ( |
| 58 | 'Internal Kibana login page is not reachable on {} from ctl ' |
| 59 | 'nodes'.format(url) |
| 60 | ) |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 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, |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 73 | param='curl -k {}/app/kibana 2>&1 | grep loading'.format(url), |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 74 | expr_form='pillar') |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 75 | assert len(result[result.keys()[0]]) != 0, ( |
| 76 | 'Public Kibana login page is not reachable on {} from ctl ' |
| 77 | 'nodes'.format(url) |
| 78 | ) |
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, |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 92 | param='curl {}/graph 2>&1 | grep Prometheus'.format(url), |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 93 | expr_form='pillar') |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 94 | assert len(result[result.keys()[0]]) != 0, ( |
| 95 | 'Internal Prometheus page is not reachable on {} from ctl ' |
| 96 | 'nodes'.format(url) |
| 97 | ) |
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, |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 110 | param='curl -k {}/graph 2>&1 | grep Prometheus'.format(url), |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 111 | expr_form='pillar') |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 112 | assert len(result[result.keys()[0]]) != 0, ( |
| 113 | 'Public Prometheus page is not reachable on {} from ctl ' |
| 114 | 'nodes'.format(url) |
| 115 | ) |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 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') |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 131 | assert len(result[result.keys()[0]]) != 0, ( |
| 132 | 'Internal AlertManager page is not reachable on {} from ctl ' |
| 133 | 'nodes'.format(url) |
| 134 | ) |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 135 | |
| 136 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 137 | @pytest.mark.smoke |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 138 | @pytest.mark.usefixtures('check_prometheus') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 139 | def test_public_ui_alert_manager(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 140 | IP = local_salt_client.pillar_get(param='_param:cluster_public_host') |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame] | 141 | proto = local_salt_client.pillar_get( |
| 142 | param='_param:cluster_public_protocol') |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 143 | port = '15011' |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame] | 144 | url = "{}://{}:{}".format(proto, IP, port) |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 145 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 146 | tgt=ctl_nodes_pillar, |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame] | 147 | param='curl -k -s {}/ | grep Alertmanager'.format(url), |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 148 | expr_form='pillar') |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 149 | assert len(result[result.keys()[0]]) != 0, ( |
| 150 | 'Public AlertManager page is not reachable on {} ' |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 151 | 'from ctl nodes'.format(url) |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 152 | ) |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 153 | |
| 154 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 155 | @pytest.mark.sl_dup |
| 156 | #stacklight-pytest? |
| 157 | @pytest.mark.full |
Oleksii Zhurba | 8ce9fcf | 2018-10-05 18:38:22 +0300 | [diff] [blame] | 158 | @pytest.mark.usefixtures('check_grafana') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 159 | def test_internal_ui_grafana(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 160 | IP = local_salt_client.pillar_get(param='_param:stacklight_monitor_address') |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 161 | protocol = 'http' |
| 162 | port = '15013' |
| 163 | url = "{}://{}:{}".format(protocol, IP, port) |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 164 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 165 | tgt=ctl_nodes_pillar, |
| 166 | param='curl {}/login 2>&1 | grep Grafana'.format(url), |
Oleksii Zhurba | 020fab4 | 2017-11-01 20:13:28 +0000 | [diff] [blame] | 167 | expr_form='pillar') |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 168 | assert len(result[result.keys()[0]]) != 0, ( |
| 169 | 'Internal Grafana page is not reachable on {} ' |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 170 | 'from ctl nodes'.format(url) |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 171 | ) |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 172 | |
| 173 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 174 | @pytest.mark.smoke |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 175 | @pytest.mark.usefixtures('check_grafana') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 176 | def test_public_ui_grafana(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 177 | IP = local_salt_client.pillar_get(param='_param:cluster_public_host') |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame] | 178 | proto = local_salt_client.pillar_get( |
| 179 | param='_param:cluster_public_protocol') |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 180 | port = '8084' |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame] | 181 | url = "{}://{}:{}".format(proto, IP, port) |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 182 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 183 | tgt=ctl_nodes_pillar, |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame] | 184 | param='curl -k {}/login 2>&1 | grep Grafana'.format(url), |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 185 | expr_form='pillar') |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 186 | assert len(result[result.keys()[0]]) != 0, ( |
Ievgeniia Zadorozhna | 09b1ae8 | 2019-01-28 13:06:01 +0300 | [diff] [blame] | 187 | 'Public Grafana page is not reachable on {} from ctl nodes'.format(url) |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 188 | ) |
Ievgeniia Zadorozhna | df243ef | 2018-11-08 18:17:17 +0300 | [diff] [blame] | 189 | |
| 190 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 191 | @pytest.mark.sl_dup |
| 192 | #stacklight-pytest? |
| 193 | @pytest.mark.full |
Ievgeniia Zadorozhna | df243ef | 2018-11-08 18:17:17 +0300 | [diff] [blame] | 194 | @pytest.mark.usefixtures('check_alerta') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 195 | def test_internal_ui_alerta(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 196 | IP = local_salt_client.pillar_get(param='_param:stacklight_monitor_address') |
Ievgeniia Zadorozhna | df243ef | 2018-11-08 18:17:17 +0300 | [diff] [blame] | 197 | protocol = 'http' |
| 198 | port = '15017' |
| 199 | url = "{}://{}:{}".format(protocol, IP, port) |
| 200 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 201 | tgt=ctl_nodes_pillar, |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 202 | param='curl {}/ 2>&1 | grep Alerta'.format(url), |
Ievgeniia Zadorozhna | df243ef | 2018-11-08 18:17:17 +0300 | [diff] [blame] | 203 | expr_form='pillar') |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 204 | assert len(result[result.keys()[0]]) != 0, ( |
| 205 | 'Internal Alerta page is not reachable on {} from ' |
| 206 | 'ctl nodes'.format(url) |
| 207 | ) |
Ievgeniia Zadorozhna | df243ef | 2018-11-08 18:17:17 +0300 | [diff] [blame] | 208 | |
| 209 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 210 | @pytest.mark.smoke |
Ievgeniia Zadorozhna | df243ef | 2018-11-08 18:17:17 +0300 | [diff] [blame] | 211 | @pytest.mark.usefixtures('check_alerta') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 212 | def test_public_ui_alerta(local_salt_client, ctl_nodes_pillar): |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 213 | IP = local_salt_client.pillar_get(param='_param:cluster_public_host') |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame] | 214 | proto = local_salt_client.pillar_get( |
| 215 | param='_param:cluster_public_protocol') |
Ievgeniia Zadorozhna | df243ef | 2018-11-08 18:17:17 +0300 | [diff] [blame] | 216 | port = '15017' |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame] | 217 | url = "{}://{}:{}".format(proto, IP, port) |
Ievgeniia Zadorozhna | df243ef | 2018-11-08 18:17:17 +0300 | [diff] [blame] | 218 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 219 | tgt=ctl_nodes_pillar, |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 220 | param='curl -k {}/ 2>&1 | grep Alerta'.format(url), |
Ievgeniia Zadorozhna | df243ef | 2018-11-08 18:17:17 +0300 | [diff] [blame] | 221 | expr_form='pillar') |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 222 | assert len(result[result.keys()[0]]) != 0, ( |
| 223 | 'Public Alerta page is not reachable on {} from ctl nodes'.format(url)) |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 224 | |
| 225 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 226 | @pytest.mark.smoke |
Oleksii Zhurba | bcb27cd | 2019-04-23 17:04:20 -0500 | [diff] [blame] | 227 | @pytest.mark.usefixtures('check_openstack') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 228 | @pytest.mark.usefixtures('check_drivetrain') |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 229 | def test_public_ui_jenkins(local_salt_client, ctl_nodes_pillar): |
| 230 | IP = local_salt_client.pillar_get(param='_param:cluster_public_host') |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame] | 231 | proto = local_salt_client.pillar_get( |
| 232 | param='_param:cluster_public_protocol') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 233 | port = '8081' |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame] | 234 | url = "{}://{}:{}".format(proto, IP, port) |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 235 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 236 | tgt=ctl_nodes_pillar, |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 237 | param='curl -k {}/ 2>&1 | grep Authentication'.format(url), |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 238 | expr_form='pillar') |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 239 | assert len(result[result.keys()[0]]) != 0, ( |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 240 | 'Public Jenkins page is not reachable on {} from ctl nodes'.format(url) |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 241 | ) |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 242 | |
| 243 | |
Oleksii Zhurba | 5b15b9b | 2019-05-09 18:53:40 -0500 | [diff] [blame] | 244 | @pytest.mark.smoke |
Oleksii Zhurba | bcb27cd | 2019-04-23 17:04:20 -0500 | [diff] [blame] | 245 | @pytest.mark.usefixtures('check_openstack') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 246 | @pytest.mark.usefixtures('check_drivetrain') |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 247 | def test_public_ui_gerrit(local_salt_client, ctl_nodes_pillar): |
| 248 | IP = local_salt_client.pillar_get(param='_param:cluster_public_host') |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame] | 249 | proto = local_salt_client.pillar_get( |
| 250 | param='_param:cluster_public_protocol') |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 251 | port = '8070' |
Oleksii Zhurba | 85f55fe | 2019-06-10 17:30:53 -0500 | [diff] [blame] | 252 | url = "{}://{}:{}".format(proto, IP, port) |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 253 | result = local_salt_client.cmd( |
Oleksii Zhurba | 4bfd2ee | 2019-04-10 21:56:58 -0500 | [diff] [blame] | 254 | tgt=ctl_nodes_pillar, |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 255 | param='curl -k {}/ 2>&1 | grep "Gerrit Code Review"'.format(url), |
Oleksii Zhurba | 25215d9 | 2019-01-31 16:35:57 -0600 | [diff] [blame] | 256 | expr_form='pillar') |
Dmitriy Kruglov | a34a304 | 2019-08-20 11:45:35 +0200 | [diff] [blame^] | 257 | assert len(result[result.keys()[0]]) != 0, ( |
| 258 | 'Public Gerrit page is not reachable on {} from ctl nodes'.format(url)) |