From bbc1395ea629794f40cabe6f3c21d6dccc02470b Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Mon, 16 Apr 2018 11:20:21 +0530 Subject: Add health check for cli Issue-ID: CLI-106 Change-Id: Ife2810ed293410af8a8a8f158de272ccfd464059 Signed-off-by: Kanagaraj Manickam k00365106 --- robot/resources/cli_interface.robot | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 robot/resources/cli_interface.robot (limited to 'robot/resources') 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} + -- cgit 1.2.3-korg