summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Donley <christopher.donley@huawei.com>2018-04-18 13:50:07 -0700
committerChris Donley <christopher.donley@huawei.com>2018-04-18 13:51:00 -0700
commit4ab8eae0e09cd04cb1241337be3da5b15445b6c6 (patch)
tree3c36cd65b16bebf9b29a85bc80af47840c275541
parenta0195572cde5915f61f506136fb1fc7649700a4b (diff)
Add healthcheck for vnfsdk
Issue-ID: VNFSDK-252 Change-Id: I7a892ab87861a76fb2021a416d8412737e37ebeb Signed-off-by: Chris Donley <christopher.donley@huawei.com>
-rw-r--r--robot/resources/vnfsdk_interface.robot25
-rw-r--r--robot/testsuites/health-check.robot4
2 files changed, 29 insertions, 0 deletions
diff --git a/robot/resources/vnfsdk_interface.robot b/robot/resources/vnfsdk_interface.robot
new file mode 100644
index 00000000..b544822e
--- /dev/null
+++ b/robot/resources/vnfsdk_interface.robot
@@ -0,0 +1,25 @@
+*** Settings ***
+Documentation The main interface for interacting with VNFSDK.
+Library RequestsClientCert
+Library RequestsLibrary
+
+Resource global_properties.robot
+
+*** Variables ***
+${VNFSDK_HEALTH_CHECK_PATH} /onapapi/vnfsdk-marketplace/v1/PackageResource/healthcheck
+${VNFSDK_ENDPOINT} ${GLOBAL_VNFSDK_SERVER_PROTOCOL}://${GLOBAL_INJECTED_VNFSDK_IP_ADDR}:${GLOBAL_VNFSDK_SERVER_PORT}
+
+*** Keywords ***
+Run VNFSDK Health Check
+ [Documentation] Runs VNFSDK Health check
+ ${resp}= Run VNFSDK Get Request ${VNFSDK_HEALTH_CHECK_PATH}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Run VNFSDK Get Request
+ [Documentation] Runs VNFSDK Get request
+ [Arguments] ${data_path}
+ ${session}= Create Session vnfsdk ${VNFSDK_ENDPOINT}
+ ${resp}= Get Request vnfsdk ${data_path}
+ Log Received response from VNFSDK ${resp.text}
+ [Return] ${resp}
+
diff --git a/robot/testsuites/health-check.robot b/robot/testsuites/health-check.robot
index 827186dc..cf9e7a51 100644
--- a/robot/testsuites/health-check.robot
+++ b/robot/testsuites/health-check.robot
@@ -181,3 +181,7 @@ Basic NBI Health Check
Basic CLI Health Check
[Tags] health core
Run CLI Health Check
+
+Basic VNFSDK Health Check
+ [Tags] health core
+ Run VNFSDK Health Check