aboutsummaryrefslogtreecommitdiffstats
path: root/robot
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-04-16 11:20:21 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-04-17 13:25:07 +0530
commitbbc1395ea629794f40cabe6f3c21d6dccc02470b (patch)
treead8088831d35c35c44d543a264b9babffac29e3d /robot
parent547e311ef5fc4e20d12160af390e84696de6f613 (diff)
Add health check for cli
Issue-ID: CLI-106 Change-Id: Ife2810ed293410af8a8a8f158de272ccfd464059 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'robot')
-rw-r--r--robot/resources/cli_interface.robot25
-rw-r--r--robot/testsuites/health-check.robot5
2 files changed, 30 insertions, 0 deletions
diff --git a/robot/resources/cli_interface.robot b/robot/resources/cli_interface.robot
new file mode 100644
index 00000000..1684a5da
--- /dev/null
+++ b/robot/resources/cli_interface.robot
@@ -0,0 +1,25 @@
+*** Settings ***
+Documentation The main interface for interacting with CLI.
+Library RequestsClientCert
+Library RequestsLibrary
+
+Resource global_properties.robot
+
+*** Variables ***
+${CLI_HEALTH_CHECK_PATH} /
+${CLI_ENDPOINT} ${GLOBAL_CLI_SERVER_PROTOCOL}://${GLOBAL_INJECTED_CLI_IP_ADDR}:${GLOBAL_CLI_SERVER_PORT}
+
+*** Keywords ***
+Run CLI Health Check
+ [Documentation] Runs CLI Health check
+ ${resp}= Run CLI Get Request ${CLI_HEALTH_CHECK_PATH}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Run CLI Get Request
+ [Documentation] Runs CLI Get request
+ [Arguments] ${data_path}
+ ${session}= Create Session cli ${CLI_ENDPOINT}
+ ${resp}= Get Request cli ${data_path}
+ Log Received response from CLI ${resp.text}
+ [Return] ${resp}
+
diff --git a/robot/testsuites/health-check.robot b/robot/testsuites/health-check.robot
index eefbd493..007db366 100644
--- a/robot/testsuites/health-check.robot
+++ b/robot/testsuites/health-check.robot
@@ -20,6 +20,7 @@ Resource ../resources/clamp_interface.robot
Resource ../resources/music/music_interface.robot
Resource ../resources/test_templates/model_test_template.robot
Resource ../resources/nbi_interface.robot
+Resource ../resources/cli_interface.robot
*** Test Cases ***
@@ -176,3 +177,7 @@ Portal Application Access Tests
Basic NBI Health Check
[Tags] externalapi
Run NBI Health Check
+
+Basic CLI Health Check
+ [Tags] health core
+ Run CLI Health Check \ No newline at end of file