aboutsummaryrefslogtreecommitdiffstats
path: root/tests/vfc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vfc')
-rw-r--r--tests/vfc/gvnfm-vnflcm/test.robot12
-rw-r--r--tests/vfc/gvnfm-vnfmgr/test.robot33
-rw-r--r--tests/vfc/gvnfm-vnfres/test.robot12
-rw-r--r--tests/vfc/nfvo-catalog/test.robot12
-rw-r--r--tests/vfc/nfvo-lcm/test.robot16
5 files changed, 83 insertions, 2 deletions
diff --git a/tests/vfc/gvnfm-vnflcm/test.robot b/tests/vfc/gvnfm-vnflcm/test.robot
index cf3d12bc..97463ac1 100644
--- a/tests/vfc/gvnfm-vnflcm/test.robot
+++ b/tests/vfc/gvnfm-vnflcm/test.robot
@@ -11,6 +11,7 @@ Library HttpLibrary.HTTP
${queryswagger_url} /api/vnflcm/v1/swagger.json
${create_vnf_url} /api/vnflcm/v1/vnf_instances
${delete_vnf_url} /api/vnflcm/v1/vnf_instances
+${healthcheck_url} /api/vnflcm/v1/health_check
#json files
${create_vnf_json} ${SCRIPTS}/../tests/vfc/gvnfm-vnflcm/jsoninput/create_vnf.json
@@ -29,3 +30,14 @@ VnflcmSwaggerTest
${response_json} json.loads ${resp.content}
${swagger_version}= Convert To String ${response_json['swagger']}
Should Be Equal ${swagger_version} 2.0
+
+VnflcmHealthCheckTest
+ [Documentation] check health for vnflcm by MSB
+ ${headers} Create Dictionary Content-Type=application/json Accept=application/json
+ Create Session web_session http://${VNFLCM_IP}:8801 headers=${headers}
+ ${resp}= Get Request web_session ${healthcheck_url}
+ ${responese_code}= Convert To String ${resp.status_code}
+ List Should Contain Value ${return_ok_list} ${responese_code}
+ ${response_json} json.loads ${resp.content}
+ ${health_status}= Convert To String ${response_json['status']}
+ Should Be Equal ${health_status} active
diff --git a/tests/vfc/gvnfm-vnfmgr/test.robot b/tests/vfc/gvnfm-vnfmgr/test.robot
new file mode 100644
index 00000000..773d83a1
--- /dev/null
+++ b/tests/vfc/gvnfm-vnfmgr/test.robot
@@ -0,0 +1,33 @@
+*** settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+
+*** Variables ***
+@{return_ok_list}= 200 201 202
+${queryswagger_url} /api/vnfmgr/v1/swagger.json
+${healthcheck_url} /api/vnfmgr/v1/health_check
+
+*** Test Cases ***
+VnfMgrSwaggerTest
+ [Documentation] query vnfmgr swagger info rest test
+ ${headers} Create Dictionary Content-Type=application/json Accept=application/json
+ Create Session web_session http://${VNFMGR_IP}:8802 headers=${headers}
+ ${resp}= Get Request web_session ${queryswagger_url}
+ ${responese_code}= Convert To String ${resp.status_code}
+ List Should Contain Value ${return_ok_list} ${responese_code}
+ ${response_json} json.loads ${resp.content}
+ ${swagger_version}= Convert To String ${response_json['swagger']}
+ Should Be Equal ${swagger_version} 2.0
+
+VnfMgrHealthCheckTest
+ [Documentation] check health for vnfmgr by MSB
+ ${headers} Create Dictionary Content-Type=application/json Accept=application/json
+ Create Session web_session http://${VNFMGR_IP}:8803 headers=${headers}
+ ${resp}= Get Request web_session ${healthcheck_url}
+ ${responese_code}= Convert To String ${resp.status_code}
+ List Should Contain Value ${return_ok_list} ${responese_code}
+ ${response_json} json.loads ${resp.content}
+ ${health_status}= Convert To String ${response_json['status']}
+ Should Be Equal ${health_status} active
diff --git a/tests/vfc/gvnfm-vnfres/test.robot b/tests/vfc/gvnfm-vnfres/test.robot
index fb87435b..6498de11 100644
--- a/tests/vfc/gvnfm-vnfres/test.robot
+++ b/tests/vfc/gvnfm-vnfres/test.robot
@@ -7,6 +7,7 @@ Library json
*** Variables ***
@{return_ok_list}= 200 201 202
${queryswagger_url} /api/vnfres/v1/swagger.json
+${healthcheck_url} /api/vnfres/v1/health_check
*** Test Cases ***
VnfresSwaggerTest
@@ -19,3 +20,14 @@ VnfresSwaggerTest
${response_json} json.loads ${resp.content}
${swagger_version}= Convert To String ${response_json['swagger']}
Should Be Equal ${swagger_version} 2.0
+
+VnfResHealthCheckTest
+ [Documentation] check health for vnfres by MSB
+ ${headers} Create Dictionary Content-Type=application/json Accept=application/json
+ Create Session web_session http://${VNFRES_IP}:8802 headers=${headers}
+ ${resp}= Get Request web_session ${healthcheck_url}
+ ${responese_code}= Convert To String ${resp.status_code}
+ List Should Contain Value ${return_ok_list} ${responese_code}
+ ${response_json} json.loads ${resp.content}
+ ${health_status}= Convert To String ${response_json['status']}
+ Should Be Equal ${health_status} active
diff --git a/tests/vfc/nfvo-catalog/test.robot b/tests/vfc/nfvo-catalog/test.robot
index 99dff9bd..b83bee47 100644
--- a/tests/vfc/nfvo-catalog/test.robot
+++ b/tests/vfc/nfvo-catalog/test.robot
@@ -9,6 +9,7 @@ Library json
${queryswagger_url} /api/catalog/v1/swagger.json
${queryVNFPackage_url} /api/catalog/v1/vnfpackages
${queryNSPackages_url} /api/catalog/v1/nspackages
+${healthcheck_url} /api/catalog/v1/health_check
*** Test Cases ***
GetVNFPackages
@@ -17,3 +18,14 @@ GetVNFPackages
${resp}= Get Request web_session ${queryVNFPackage_url}
${responese_code}= Convert To String ${resp.status_code}
List Should Contain Value ${return_ok_list} ${responese_code}
+
+CatalogHealthCheckTest
+ [Documentation] check health for catalog by MSB
+ ${headers} Create Dictionary Content-Type=application/json Accept=application/json
+ Create Session web_session http://${CATALOG_IP}:8806 headers=${headers}
+ ${resp}= Get Request web_session ${healthcheck_url}
+ ${responese_code}= Convert To String ${resp.status_code}
+ List Should Contain Value ${return_ok_list} ${responese_code}
+ ${response_json} json.loads ${resp.content}
+ ${health_status}= Convert To String ${response_json['status']}
+ Should Be Equal ${health_status} active
diff --git a/tests/vfc/nfvo-lcm/test.robot b/tests/vfc/nfvo-lcm/test.robot
index 44d23292..6711cf69 100644
--- a/tests/vfc/nfvo-lcm/test.robot
+++ b/tests/vfc/nfvo-lcm/test.robot
@@ -9,8 +9,9 @@ Library HttpLibrary.HTTP
*** Variables ***
@{return_ok_list}= 200 201 202 204
${queryswagger_url} /api/nslcm/v1/swagger.json
-${create_ns_url} /api/nslcm/v1/ns
-${delete_ns_url} /api/nslcm/v1/ns
+${create_ns_url} /api/nslcm/v1/ns
+${delete_ns_url} /api/nslcm/v1/ns
+${healthcheck_url} /api/nslcm/v1/health_check
#json files
${create_ns_json} ${SCRIPTS}/../tests/vfc/nfvo-lcm/jsoninput/create_ns.json
@@ -62,3 +63,14 @@ DeleteNS Test
${resp}= Delete Request web_session ${delete_ns_url}/${nsInstId}
${responese_code}= Convert To String ${resp.status_code}
List Should Contain Value ${return_ok_list} ${responese_code}
+
+LcmHealthCheckTest
+ [Documentation] check health for nslcm by MSB
+ ${headers} Create Dictionary Content-Type=application/json Accept=application/json
+ Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ ${resp}= Get Request web_session ${healthcheck_url}
+ ${responese_code}= Convert To String ${resp.status_code}
+ List Should Contain Value ${return_ok_list} ${responese_code}
+ ${response_json} json.loads ${resp.content}
+ ${health_status}= Convert To String ${response_json['status']}
+ Should Be Equal ${health_status} active