aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests/sdnc/healthcheck/test1.robot
diff options
context:
space:
mode:
authorStilwell, David (stilwelld) <stilwelld@att.com>2017-10-27 13:40:09 +0000
committerStilwell, David (stilwelld) <stilwelld@att.com>2017-10-27 13:40:37 +0000
commiteb66113dc9d07df8ba74dec0df55213c92787a70 (patch)
treeb9de16e173c2d22328120a429d1f66f4111695fc /test/csit/tests/sdnc/healthcheck/test1.robot
parent312e7f3db1dd2664a4320e9be087965c00bfe44e (diff)
Add Functional test case
Added Functional test case : validate vnf-api Added additional sleep to setup.sh Updated teardown to dmaap container cleanup Change-Id: I7586d0526053baa24a36d9da371d20239abb76b4 Issue-ID: SDNC-84 Signed-off-by: Stilwell, David (stilwelld) <stilwelld@att.com>
Diffstat (limited to 'test/csit/tests/sdnc/healthcheck/test1.robot')
-rw-r--r--test/csit/tests/sdnc/healthcheck/test1.robot45
1 files changed, 37 insertions, 8 deletions
diff --git a/test/csit/tests/sdnc/healthcheck/test1.robot b/test/csit/tests/sdnc/healthcheck/test1.robot
index 1adb9a6b3..4bf3d25e7 100644
--- a/test/csit/tests/sdnc/healthcheck/test1.robot
+++ b/test/csit/tests/sdnc/healthcheck/test1.robot
@@ -1,16 +1,45 @@
*** Settings ***
-Library OperatingSystem
-Library Process
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+Library String
*** Variables ***
+${SDN_APIDOCS_URI} /apidoc/apis
+${SDN_HEALTHCHECK_OPERATION_PATH} /operations/SLI-API:healthcheck
+${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH} /operations/VNF-API:preload-vnf-topology-operation
-${health_check} ${SCRIPTS}/health_check.sh
+*** Test Cases ***
+Healthcheck API
+ Create Session sdnc http://localhost:8282/restconf
+ ${data}= Get Binary File ${CURDIR}${/}data${/}data.json
+ &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json
+ ${resp}= Post Request sdnc ${SDN_HEALTHCHECK_OPERATION_PATH} data=${data} headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['output']['response-code']} 200
+
+Check SLI-API
+ Create Session sdnc http://localhost:8282
+ &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json
+ ${resp}= Get Request sdnc ${SDN_APIDOCS_URI} headers=${headers}
+ Log ${resp.content}
+ Should Contain ${resp.content} SLI-API
-*** Test Cases ***
-Health check test case for SDNC
- [Documentation] Health check
- ${result_hc}= Run Process bash ${health_check} > log_hc.txt shell=yes
- Should Be Equal As Integers ${result_hc.rc} 0
+Check VNF-API
+ Create Session sdnc http://localhost:8282
+ &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json
+ ${resp}= Get Request sdnc ${SDN_APIDOCS_URI} headers=${headers}
+ Log ${resp.content}
+ Should Contain ${resp.content} VNF-API
+Test Preload
+ Create Session sdnc http://localhost:8282/restconf
+ ${data}= Get Binary File ${CURDIR}${/}data${/}preload.json
+ &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json
+ ${resp}= Post Request sdnc ${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH} data=${data} headers=${headers}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['output']['response-code']} 200