From 7aa8cd32c8458cd9a148ca8dad4c26635cab6d8b Mon Sep 17 00:00:00 2001 From: fujinhua Date: Fri, 5 Apr 2019 08:20:53 +0800 Subject: [PATCH] add csit case for nslcm Change-Id: Iae948c1535e7f9b0cb265cd1e0d973e30168bd5b Issue-ID: INT-1015 Signed-off-by: fujinhua --- tests/vfc/nfvo-lcm/test.robot | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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 -- 2.16.6