summaryrefslogtreecommitdiffstats
path: root/robot/resources/log_interface.robot
diff options
context:
space:
mode:
authorNeal Chatterley <nealch@amdocs.com>2018-04-18 18:19:39 +0000
committerNeal Chatterley <nealch@amdocs.com>2018-04-19 14:39:58 +0000
commite908d998b3d957aa06688136da93b25cfd930100 (patch)
tree46751cbbd9368f694d11053caf8a393d73eb7b84 /robot/resources/log_interface.robot
parent4457d8a98a83c93db6c3e08a880362b7032c5a56 (diff)
Add LOG component robot healthcheck
Issue-ID: OOM-914 Change-Id: I92fda47890e3fdf22d98bea0e312096ff097bf7a Signed-off-by: Neal Chatterley <nealch@amdocs.com>
Diffstat (limited to 'robot/resources/log_interface.robot')
-rw-r--r--robot/resources/log_interface.robot56
1 files changed, 56 insertions, 0 deletions
diff --git a/robot/resources/log_interface.robot b/robot/resources/log_interface.robot
new file mode 100644
index 00000000..aeb69b17
--- /dev/null
+++ b/robot/resources/log_interface.robot
@@ -0,0 +1,56 @@
+*** Settings ***
+Documentation Tests the health of the log containers: Elasticsearch, Logstash and Kibana.
+Library Collections
+Library String
+Library RequestsLibrary
+Resource global_properties.robot
+
+*** Variables ***
+${LOG_PATH} /
+${LOG_ELASTICSEARCH_ENDPOINT} ${GLOBAL_LOG_SERVER_PROTOCOL}://${GLOBAL_INJECTED_LOG_ELASTICSEARCH_IP_ADDR}:${GLOBAL_LOG_ELASTICSEARCH_PORT}
+${LOG_LOGSTASH_ENDPOINT} ${GLOBAL_LOG_SERVER_PROTOCOL}://${GLOBAL_INJECTED_LOG_LOGSTASH_IP_ADDR}:${GLOBAL_LOG_LOGSTASH_PORT}
+${LOG_KIBANA_ENDPOINT} ${GLOBAL_LOG_SERVER_PROTOCOL}://${GLOBAL_INJECTED_LOG_KIBANA_IP_ADDR}:${GLOBAL_LOG_KIBANA_PORT}
+
+*** Keywords ***
+Run Log Elasticsearch Health Check
+ [Documentation] Tests Elasticsearch interface
+ ${resp}= Run Log Elasticsearch Get Request ${LOG_PATH}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Run Log Elasticsearch Get Request
+ [Documentation] Runs an Elasticsearch request
+ [Arguments] ${data_path}
+ Log Creating session ${LOG_ELASTICSEARCH_ENDPOINT}
+ ${session}= Create Session log-elasticsearch ${LOG_ELASTICSEARCH_ENDPOINT}
+ ${resp}= Get Request log-elasticsearch ${data_path}
+ Log Received response from log-elasticsearch ${resp.text}
+ [Return] ${resp}
+
+Run Log Logstash Health Check
+ [Documentation] Tests Logstash interface
+ ${resp}= Run Log Logstash Get Request ${LOG_PATH}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Run Log Logstash Get Request
+ [Documentation] Runs a Logstash request
+ [Arguments] ${data_path}
+ Log Creating session ${LOG_LOGSTASH_ENDPOINT}
+ ${session}= Create Session log-logstash ${LOG_LOGSTASH_ENDPOINT}
+ ${resp}= Get Request log-logstash ${data_path}
+ Log Received response from log-logstash ${resp.text}
+ [Return] ${resp}
+
+Run Log Kibana Health Check
+ [Documentation] Tests Kibana interface
+ ${resp}= Run Log Kibana Get Request ${LOG_PATH}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Run Log Kibana Get Request
+ [Documentation] Runs a Kibana request
+ [Arguments] ${data_path}
+ Log Creating session ${LOG_KIBANA_ENDPOINT}
+ ${session}= Create Session log-kibana ${LOG_KIBANA_ENDPOINT}
+ ${resp}= Get Request log-kibana ${data_path}
+ Log Received response from log-kibana ${resp.text}
+ [Return] ${resp}
+