diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2018-09-27 10:29:30 -0700 |
---|---|---|
committer | Gary Wu <gary.i.wu@huawei.com> | 2018-09-27 12:50:28 -0700 |
commit | 2d3d8dcf6ef1bd2a161c69d561c629c5ec3f59c4 (patch) | |
tree | 652fd47a183c291e96c6721f550a5f63464f6e66 /test/csit/tests/vnfsdk-ice/ice-server/validation_test.robot | |
parent | e161173e279a73134dda4c2f429605d6c9ee1fe7 (diff) |
Move CSIT to integration/csit repo
To facilite branching of CSIT tests, all CSIT test
code and scripts are relocated to the integration/csit
repo.
Change-Id: I6777cd414e43dbf2bfa6215f7e50849e1a6a2e59
Issue-ID: INT-671
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'test/csit/tests/vnfsdk-ice/ice-server/validation_test.robot')
-rw-r--r-- | test/csit/tests/vnfsdk-ice/ice-server/validation_test.robot | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/test/csit/tests/vnfsdk-ice/ice-server/validation_test.robot b/test/csit/tests/vnfsdk-ice/ice-server/validation_test.robot deleted file mode 100644 index 1a134b017..000000000 --- a/test/csit/tests/vnfsdk-ice/ice-server/validation_test.robot +++ /dev/null @@ -1,69 +0,0 @@ -*** settings *** -Library OperatingSystem -Library Process -Library String -Library Collections -Library RequestsLibrary -Library json - - -*** Variables *** -${valid_heat_zip} ${SCRIPTS}/../tests/vnfsdk-ice/ice-server/heat_template_ok.zip -${empty_heat_zip} ${SCRIPTS}/../tests/vnfsdk-ice/ice-server/heat_template_empty.zip -${ice_uri} /onapapi/ice/v1/ - -*** Test Cases *** - -ICE health Check - [Documentation] Validate that ICE is up - Create Session ice_session http://${ICE_IP}:5000 - &{headers}= Create Dictionary Content-Type=application/json - - ${resp}= Get Request ice_session ${ice_uri} headers=${headers} - - Should Be Equal As Strings ${resp.status_code} 200 - -Check status code for valid HEAT based VNF package - [Documentation] Post a valid VNF package and expect 200 Response - ${fileData}= Get Binary File ${valid_heat_zip} - ${fileDir} ${fileName}= Split Path ${valid_heat_zip} - ${partData}= Create List ${fileName} ${fileData} application/octet-stream - &{fileParts}= Create Dictionary - Set To Dictionary ${fileParts} file=${partData} - - ${resp}= Post Request ice_session ${ice_uri} files=${fileParts} - - Log Receive HTTP Status code ${resp.status_code} - Should Be Equal As Strings ${resp.status_code} 200 - ${json} = Set Variable ${resp.json()} - ${message} = Get From Dictionary ${json} message - Should Be Equal ${message} OK - -Check status code for empty VNF package - [Documentation] Post an empty VNF package and expect 422 Response - ${fileData}= Get Binary File ${empty_heat_zip} - ${fileDir} ${fileName}= Split Path ${empty_heat_zip} - ${partData}= Create List ${fileName} ${fileData} application/octet-stream - &{fileParts}= Create Dictionary - Set To Dictionary ${fileParts} file=${partData} - - ${resp}= Post Request ice_session ${ice_uri} files=${fileParts} - - Log Receive HTTP Status code ${resp.status_code} - Should Be Equal As Strings ${resp.status_code} 422 - ${json} = Set Variable ${resp.json()} - ${message} = Get From Dictionary ${json} message - Should Be Equal ${message} Tests failed - -Check status code for invalid request - [Documentation] Post an invalid request and expect 400 Response - ${fileData}= Get Binary File ${empty_heat_zip} - ${fileDir} ${fileName}= Split Path ${empty_heat_zip} - ${partData}= Create List ${fileName} ${fileData} application/octet-stream - &{fileParts}= Create Dictionary - Set To Dictionary ${fileParts} foo=${partData} - - ${resp}= Post Request ice_session ${ice_uri} files=${fileParts} - - Log Receive HTTP Status code ${resp.status_code} - Should Be Equal As Strings ${resp.status_code} 400 |