blob: aeb69b17ce7d1db7d55739c262c98213c67cba5f [file] [log] [blame]
Neal Chatterleye908d992018-04-18 18:19:39 +00001*** Settings ***
2Documentation Tests the health of the log containers: Elasticsearch, Logstash and Kibana.
3Library Collections
4Library String
5Library RequestsLibrary
6Resource global_properties.robot
7
8*** Variables ***
9${LOG_PATH} /
10${LOG_ELASTICSEARCH_ENDPOINT} ${GLOBAL_LOG_SERVER_PROTOCOL}://${GLOBAL_INJECTED_LOG_ELASTICSEARCH_IP_ADDR}:${GLOBAL_LOG_ELASTICSEARCH_PORT}
11${LOG_LOGSTASH_ENDPOINT} ${GLOBAL_LOG_SERVER_PROTOCOL}://${GLOBAL_INJECTED_LOG_LOGSTASH_IP_ADDR}:${GLOBAL_LOG_LOGSTASH_PORT}
12${LOG_KIBANA_ENDPOINT} ${GLOBAL_LOG_SERVER_PROTOCOL}://${GLOBAL_INJECTED_LOG_KIBANA_IP_ADDR}:${GLOBAL_LOG_KIBANA_PORT}
13
14*** Keywords ***
15Run Log Elasticsearch Health Check
16 [Documentation] Tests Elasticsearch interface
17 ${resp}= Run Log Elasticsearch Get Request ${LOG_PATH}
18 Should Be Equal As Strings ${resp.status_code} 200
19
20Run Log Elasticsearch Get Request
21 [Documentation] Runs an Elasticsearch request
22 [Arguments] ${data_path}
23 Log Creating session ${LOG_ELASTICSEARCH_ENDPOINT}
24 ${session}= Create Session log-elasticsearch ${LOG_ELASTICSEARCH_ENDPOINT}
25 ${resp}= Get Request log-elasticsearch ${data_path}
26 Log Received response from log-elasticsearch ${resp.text}
27 [Return] ${resp}
28
29Run Log Logstash Health Check
30 [Documentation] Tests Logstash interface
31 ${resp}= Run Log Logstash Get Request ${LOG_PATH}
32 Should Be Equal As Strings ${resp.status_code} 200
33
34Run Log Logstash Get Request
35 [Documentation] Runs a Logstash request
36 [Arguments] ${data_path}
37 Log Creating session ${LOG_LOGSTASH_ENDPOINT}
38 ${session}= Create Session log-logstash ${LOG_LOGSTASH_ENDPOINT}
39 ${resp}= Get Request log-logstash ${data_path}
40 Log Received response from log-logstash ${resp.text}
41 [Return] ${resp}
42
43Run Log Kibana Health Check
44 [Documentation] Tests Kibana interface
45 ${resp}= Run Log Kibana Get Request ${LOG_PATH}
46 Should Be Equal As Strings ${resp.status_code} 200
47
48Run Log Kibana Get Request
49 [Documentation] Runs a Kibana request
50 [Arguments] ${data_path}
51 Log Creating session ${LOG_KIBANA_ENDPOINT}
52 ${session}= Create Session log-kibana ${LOG_KIBANA_ENDPOINT}
53 ${resp}= Get Request log-kibana ${data_path}
54 Log Received response from log-kibana ${resp.text}
55 [Return] ${resp}
56