aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--robot/resources/asdc_interface.robot4
-rw-r--r--robot/resources/log_interface.robot56
-rw-r--r--robot/testsuites/health-check.robot21
3 files changed, 77 insertions, 4 deletions
diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot
index 92a41c91..f41f13e4 100644
--- a/robot/resources/asdc_interface.robot
+++ b/robot/resources/asdc_interface.robot
@@ -417,10 +417,12 @@ Run ASDC Health Check
${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
${resp}= Get Request asdc ${ASDC_HEALTH_CHECK_PATH} headers=${headers}
Should Be Equal As Strings ${resp.status_code} 200
+ ${SDC_DE_HEALTH}= Catenate UP
@{ITEMS}= Copy List ${resp.json()['componentsInfo']}
:FOR ${ELEMENT} IN @{ITEMS}
\ Log ${ELEMENT['healthCheckStatus']}
- \ Should Be Equal As Strings ${ELEMENT['healthCheckStatus']} UP
+ \ ${SDC_DE_HEALTH} Set Variable If (('DE' in '${ELEMENT['healthCheckComponent']}') and ('${ELEMENT['healthCheckStatus']}' == 'UP')) or ('${SDC_DE_HEALTH}'=='UP') UP
+ Should Be Equal As Strings ${SDC_DE_HEALTH} UP
Run ASDC Get Request
[Documentation] Runs an ASDC get request
[Arguments] ${data_path} ${user}=${ASDC_DESIGNER_USER_ID}
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}
+
diff --git a/robot/testsuites/health-check.robot b/robot/testsuites/health-check.robot
index 070c1e1c..9d049efb 100644
--- a/robot/testsuites/health-check.robot
+++ b/robot/testsuites/health-check.robot
@@ -21,6 +21,8 @@ Resource ../resources/music/music_interface.robot
Resource ../resources/test_templates/model_test_template.robot
Resource ../resources/nbi_interface.robot
Resource ../resources/cli_interface.robot
+Resource ../resources/vnfsdk_interface.robot
+Resource ../resources/log_interface.robot
*** Test Cases ***
@@ -171,13 +173,26 @@ Portal Application Access Tests
Run Portal Application Access Tests
Basic NBI Health Check
- [Tags] externalapi api
+ [Tags] health externalapi api
Run NBI Health Check
Basic CLI Health Check
- [Tags] health core
+ [Tags] health core
Run CLI Health Check
Basic VNFSDK Health Check
- [Tags] health core
+ [Tags] health core
Run VNFSDK Health Check
+
+Basic Log Elasticsearch Health Check
+ [Tags] health core
+ Run Log Elasticsearch Health Check
+
+Basic Log Logstash Health Check
+ [Tags] health core
+ Run Log Logstash Health Check
+
+Basic Log Kibana Health Check
+ [Tags] health core
+ Run Log Kibana Health Check
+