aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests
diff options
context:
space:
mode:
Diffstat (limited to 'test/csit/tests')
-rw-r--r--test/csit/tests/aai/esr-server/startup/test1.robot2
-rw-r--r--test/csit/tests/dcaegen2/testcases/dcae_ves.robot28
-rw-r--r--test/csit/tests/music/music-suite/music-test.robot124
-rw-r--r--test/csit/tests/optf-has/has/__init__.robot (renamed from test/csit/tests/optf/has/__init__.robot)0
-rw-r--r--test/csit/tests/optf-has/has/data/plan_with_wrong_version.json (renamed from test/csit/tests/optf/has/data/plan_with_wrong_version.json)0
-rw-r--r--test/csit/tests/optf-has/has/data/plan_without_demand_section.json (renamed from test/csit/tests/optf/has/data/plan_without_demand_section.json)0
-rw-r--r--test/csit/tests/optf-has/has/optf_has_test.robot120
-rw-r--r--test/csit/tests/optf-has/osdf/data/sampletest.txt (renamed from test/csit/tests/optf/osdf/data/sampletest.txt)0
-rw-r--r--test/csit/tests/optf/has/optf_has_test.robot65
-rw-r--r--test/csit/tests/vnfsdk-ice/ice-server/heat_template_empty.zipbin0 -> 166 bytes
-rw-r--r--test/csit/tests/vnfsdk-ice/ice-server/heat_template_ok.zipbin0 -> 1120 bytes
-rw-r--r--test/csit/tests/vnfsdk-ice/ice-server/validation_test.robot69
12 files changed, 329 insertions, 79 deletions
diff --git a/test/csit/tests/aai/esr-server/startup/test1.robot b/test/csit/tests/aai/esr-server/startup/test1.robot
index 53afeed27..d1504a1b4 100644
--- a/test/csit/tests/aai/esr-server/startup/test1.robot
+++ b/test/csit/tests/aai/esr-server/startup/test1.robot
@@ -4,7 +4,7 @@ Library RequestsLibrary
*** Test Cases ***
Liveness Test
[Documentation] Check various endpoints for basic liveness check
- Create Session esr-server http://${ESRSERVER_IP}:9518
+ Create Session esr-server https://${ESRSERVER_IP}:9518
CheckUrl esr-server /api/aai-esr-server/v1/test
*** Keywords ***
diff --git a/test/csit/tests/dcaegen2/testcases/dcae_ves.robot b/test/csit/tests/dcaegen2/testcases/dcae_ves.robot
index eee6ea569..47ce5f14d 100644
--- a/test/csit/tests/dcaegen2/testcases/dcae_ves.robot
+++ b/test/csit/tests/dcaegen2/testcases/dcae_ves.robot
@@ -75,12 +75,13 @@ Publish Single VES VNF Measurement Event
Publish VES VoLTE Fault Batch Events
[Tags] DCAE-VESC-R1
- [Documentation] Post batched events and expect 202 Response
+ [Documentation] Post batched events and expect 200 Response
${evtdata}= Get Event Data From File ${EVENT_BATCH_DATA_FILE}
${headers}= Create Header From String ${HEADER_STRING}
${resp}= Publish Event To VES Collector No Auth ${VESC_URL} ${VES_BATCH_EVENT_PATH} ${headers} ${evtdata}
Should Be Equal As Strings ${resp.status_code} 200
- ${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546016
+ #${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546016
+ ${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546025
Should Be Equal As Strings ${ret} true
@@ -118,16 +119,16 @@ Publish VES Event With Invalid URL Path
Should Be Equal As Strings ${resp.status_code} 404
-Enable VESC HTTPS And Basic Auth
- [Tags] DCAE-VESC-R1
- [Documentation] Enable VESC Https and Authentication, Disable Http and Run Health Check
- Enable VESC Https Auth
-
- ${auth}= Create List ${VESC_HTTPS_USER} ${VESC_HTTPS_PD}
- ${session}= Create Session dcaegen2-r1 ${VESC_URL_HTTPS} auth=${auth} disable_warnings=1
- ${headers}= Create Dictionary Accept=*/* X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Get Request dcaegen2-r1 /healthcheck headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200
+#Enable VESC HTTPS And Basic Auth
+ #[Tags] DCAE-VESC-R1
+ #[Documentation] Enable VESC Https and Authentication, Disable Http and Run Health Check
+ #Enable VESC Https Auth
+ #
+ #${auth}= Create List ${VESC_HTTPS_USER} ${VESC_HTTPS_PD}
+ #${session}= Create Session dcaegen2-r1 ${VESC_URL_HTTPS} auth=${auth} disable_warnings=1
+ #${headers}= Create Dictionary Accept=*/* X-FromAppId=${GLOBAL_APPLICATION_ID}
+ #${resp}= Get Request dcaegen2-r1 /healthcheck headers=${headers}
+ #Should Be Equal As Strings ${resp.status_code} 200
Publish Single VES Fault Event Over HTTPS
[Tags] DCAE-VESC-R1
@@ -164,7 +165,8 @@ Publish VES Fault Batch Events Over HTTPS
${headers}= Create Header From String ${HEADER_STRING}
${resp}= Publish Event To VES Collector ${VESC_URL_HTTPS} ${VES_BATCH_EVENT_PATH} ${headers} ${evtdata} ${VESC_HTTPS_USER} ${VESC_HTTPS_PD}
Should Be Equal As Strings ${resp.status_code} 200
- ${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546016
+ #${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546016
+ ${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546025
Should Be Equal As Strings ${ret} true
diff --git a/test/csit/tests/music/music-suite/music-test.robot b/test/csit/tests/music/music-suite/music-test.robot
index 4af4ebc0d..9f8e435c8 100644
--- a/test/csit/tests/music/music-suite/music-test.robot
+++ b/test/csit/tests/music/music-suite/music-test.robot
@@ -56,6 +56,130 @@ Get Music Version
Log To Console body = ${resp.text}
Should Be Equal As Integers ${resp.status_code} 200
+Music AddOnBoarding
+ [Documentation] It sends a REST POST request to Music to Onboard a new application
+ Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT}
+ ${data}= Get Binary File ${CURDIR}${/}data${/}onboard.json
+ &{headers}= Create Dictionary ns=lb7254 userId=music password=music Content-Type=application/json Accept=application/json
+ ${resp}= Post Request musicaas /MUSIC/rest/v2/admin/onboardAppWithMusic data=${data} headers=${headers}
+ Log To Console *********************
+ Log To Console response = ${resp}
+ Log To Console body = ${resp.text}
+ ${response_json} json.loads ${resp.content}
+ ${generatedAID}= Convert To String ${response_json['Generated AID']}
+ Set Global Variable ${generatedAID}
+ Log To Console generatedAID = ${generatedAID}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+Music CreateKeyspace
+ [Documentation] It sends a REST POST request to Music to create a new keyspace in Cassandra
+ Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT}
+ ${data}= Get Binary File ${CURDIR}${/}data${/}createkeyspace.json
+ &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json
+ ${resp}= Post Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace data=${data} headers=${headers}
+ Log To Console *********************
+ Log To Console response = ${resp}
+ Log To Console body = ${resp.text}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+Music CreateTable
+ [Documentation] It sends a REST POST request to Music to create a new Table in Cassandra
+ Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT}
+ ${data}= Get Binary File ${CURDIR}${/}data${/}createtable.json
+ &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json
+ ${resp}= Post Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable data=${data} headers=${headers}
+ Log To Console *********************
+ Log To Console response = ${resp}
+ Log To Console body = ${resp.text}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+Music InsertRow
+ [Documentation] It sends a REST POST request to Music to create a new row in Cassandra
+ Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT}
+ ${data}= Get Binary File ${CURDIR}${/}data${/}insertrow_eventual.json
+ &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json
+ ${resp}= Post Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows/?row=emp1 data=${data} headers=${headers}
+ Log To Console *********************
+ Log To Console response = ${resp}
+ Log To Console body = ${resp.text}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+Music ReadRowJustInserted
+ [Documentation] It sends a REST GET request to Music to Read the row just inserted in Cassandra
+ Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT}
+ &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json
+ ${resp}= Get Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1 headers=${headers}
+ Log To Console *********************
+ Log To Console response = ${resp}
+ Log To Console body = ${resp.text}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+Music UpdateRowInAtomicWay
+ [Documentation] It sends a REST PUT request to Music to create a new row in Cassandra
+ Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT}
+ ${data}= Get Binary File ${CURDIR}${/}data${/}updaterow_atomic.json
+ &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json
+ ${resp}= Put Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1 data=${data} headers=${headers}
+ Log To Console *********************
+ Log To Console response = ${resp}
+ Log To Console body = ${resp.text}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+Music ReadRowAfterUpdate
+ [Documentation] It sends a REST GET request to Music to Read the row just inserted in Cassandra
+ Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT}
+ &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json
+ ${resp}= Get Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1 headers=${headers}
+ Log To Console *********************
+ Log To Console response = ${resp}
+ Log To Console body = ${resp.text}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+Music DeleteRow
+ [Documentation] It sends a REST DELETE request to Music to delete a row in Cassandra
+ Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT}
+ ${data}= Get Binary File ${CURDIR}${/}data${/}deleterow_eventual.json
+ &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json
+ ${resp}= Delete Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1 data=${data} headers=${headers}
+ Log To Console *********************
+ Log To Console response = ${resp}
+ Log To Console body = ${resp.text}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+Music DropTable
+ [Documentation] It sends a REST Delete request to Music to drop one existing Table in Cassandra
+ Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT}
+ ${data}= Get Binary File ${CURDIR}${/}data${/}droptable.json
+ &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json
+ ${resp}= Delete Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable data=${data} headers=${headers}
+ Log To Console *********************
+ Log To Console response = ${resp}
+ Log To Console body = ${resp.text}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+Music DropKeyspace
+ [Documentation] It sends a REST DELETE request to Music to drop one existing keyspace in Cassandra
+ Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT}
+ ${data}= Get Binary File ${CURDIR}${/}data${/}dropkeyspace.json
+ &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json
+ ${resp}= Delete Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace data=${data} headers=${headers}
+ Log To Console *********************
+ Log To Console response = ${resp}
+ Log To Console body = ${resp.text}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+
+Music DeleteOnBoarding
+ [Documentation] It sends a REST DELETE request to Music to remove a previosly onboarded application
+ Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT}
+ ${data}= Get Binary File ${CURDIR}${/}data${/}onboard.json
+ &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json
+ ${resp}= Delete Request musicaas /MUSIC/rest/v2/admin/onboardAppWithMusic data=${data} headers=${headers}
+ Log To Console *********************
+ Log To Console response = ${resp}
+ Log To Console body = ${resp.text}
+ Should Be Equal As Integers ${resp.status_code} 200
+
*** Keywords ***
diff --git a/test/csit/tests/optf/has/__init__.robot b/test/csit/tests/optf-has/has/__init__.robot
index fb654d7bb..fb654d7bb 100644
--- a/test/csit/tests/optf/has/__init__.robot
+++ b/test/csit/tests/optf-has/has/__init__.robot
diff --git a/test/csit/tests/optf/has/data/plan_with_wrong_version.json b/test/csit/tests/optf-has/has/data/plan_with_wrong_version.json
index 9471fbf82..9471fbf82 100644
--- a/test/csit/tests/optf/has/data/plan_with_wrong_version.json
+++ b/test/csit/tests/optf-has/has/data/plan_with_wrong_version.json
diff --git a/test/csit/tests/optf/has/data/plan_without_demand_section.json b/test/csit/tests/optf-has/has/data/plan_without_demand_section.json
index 87a459d87..87a459d87 100644
--- a/test/csit/tests/optf/has/data/plan_without_demand_section.json
+++ b/test/csit/tests/optf-has/has/data/plan_without_demand_section.json
diff --git a/test/csit/tests/optf-has/has/optf_has_test.robot b/test/csit/tests/optf-has/has/optf_has_test.robot
new file mode 100644
index 000000000..4882c229f
--- /dev/null
+++ b/test/csit/tests/optf-has/has/optf_has_test.robot
@@ -0,0 +1,120 @@
+*** Settings ***
+Library OperatingSystem
+Library RequestsLibrary
+Library json
+
+*** Variables ***
+${MESSAGE} {"ping": "ok"}
+${RESP_STATUS} "error"
+${RESP_MESSAGE_WRONG_VERSION} "conductor_template_version must be one of: 2016-11-01"
+${RESP_MESSAGE_WITHOUT_DEMANDS} Undefined Demand
+
+#global variables
+${generatedPlanId}
+
+*** Test Cases ***
+Check Cassandra Docker Container
+ [Documentation] It checks cassandra docker container is running
+ ${rc} ${output}= Run and Return RC and Output docker ps
+ Log To Console *********************
+ Log To Console retrurn_code = ${rc}
+ Log To Console output = ${output}
+ Should Be Equal As Integers ${rc} 0
+ Should Contain ${output} music-db
+
+Check Zookeeper Docker Container
+ [Documentation] It checks zookeeper docker container is running
+ ${rc} ${output}= Run and Return RC and Output docker ps
+ Log To Console *********************
+ Log To Console retrurn_code = ${rc}
+ Log To Console output = ${output}
+ Should Be Equal As Integers ${rc} 0
+ Should Contain ${output} music-zk
+
+Check Tomcat Docker Container
+ [Documentation] It checks tomcat docker container is running
+ ${rc} ${output}= Run and Return RC and Output docker ps
+ Log To Console *********************
+ Log To Console retrurn_code = ${rc}
+ Log To Console output = ${output}
+ Should Be Equal As Integers ${rc} 0
+ Should Contain ${output} music-tomcat
+
+Check Music War Docker Container
+ [Documentation] It checks music.war docker container is running
+ ${rc} ${output}= Run and Return RC and Output docker ps
+ Log To Console *********************
+ Log To Console retrurn_code = ${rc}
+ Log To Console output = ${output}
+ Should Be Equal As Integers ${rc} 0
+ Should Contain ${output} music-war
+
+Get Music Version
+ [Documentation] It sends a REST GET request to retrieve the Music.war version
+ Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT}
+ &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
+ ${resp}= Get Request musicaas /MUSIC/rest/v2/version headers=${headers}
+ Log To Console *********************
+ Log To Console response = ${resp}
+ Log To Console body = ${resp.text}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+Check ConductorApi Docker Container
+ [Documentation] It checks conductor-api docker container is running
+ ${rc} ${output}= Run and Return RC and Output docker ps
+ Log To Console *********************
+ Log To Console retrurn_code = ${rc}
+ Log To Console output = ${output}
+ Should Be Equal As Integers ${rc} 0
+ Should Contain ${output} cond-api
+
+Check ConductorController Docker Container
+ [Documentation] It checks conductor-controller docker container is running
+ ${rc} ${output}= Run and Return RC and Output docker ps
+ Log To Console *********************
+ Log To Console retrurn_code = ${rc}
+ Log To Console output = ${output}
+ Should Be Equal As Integers ${rc} 0
+ Should Contain ${output} cond-cont
+
+Check ConductorSolver Docker Container
+ [Documentation] It checks conductor-solver docker container is running
+ ${rc} ${output}= Run and Return RC and Output docker ps
+ Log To Console *********************
+ Log To Console retrurn_code = ${rc}
+ Log To Console output = ${output}
+ Should Be Equal As Integers ${rc} 0
+ Should Contain ${output} cond-solv
+
+Check ConductorReservation Docker Container
+ [Documentation] It checks conductor-reservation docker container is running
+ ${rc} ${output}= Run and Return RC and Output docker ps
+ Log To Console *********************
+ Log To Console retrurn_code = ${rc}
+ Log To Console output = ${output}
+ Should Be Equal As Integers ${rc} 0
+ Should Contain ${output} cond-resv
+
+Check ConductorData Docker Container
+ [Documentation] It checks conductor-data docker container is running
+ ${rc} ${output}= Run and Return RC and Output docker ps
+ Log To Console *********************
+ Log To Console retrurn_code = ${rc}
+ Log To Console output = ${output}
+ Should Be Equal As Integers ${rc} 0
+ Should Contain ${output} cond-data
+
+Get Root Url
+ [Documentation] It sends a REST GET request to root url
+ Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT}
+ &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
+ ${resp}= Get Request optf-cond / headers=${headers}
+ Log To Console *********************
+ Log To Console response = ${resp}
+ Log To Console body = ${resp.text}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+
+*** Keywords ***
+
+
diff --git a/test/csit/tests/optf/osdf/data/sampletest.txt b/test/csit/tests/optf-has/osdf/data/sampletest.txt
index 9f4e8d7d6..9f4e8d7d6 100644
--- a/test/csit/tests/optf/osdf/data/sampletest.txt
+++ b/test/csit/tests/optf-has/osdf/data/sampletest.txt
diff --git a/test/csit/tests/optf/has/optf_has_test.robot b/test/csit/tests/optf/has/optf_has_test.robot
deleted file mode 100644
index f939bd91a..000000000
--- a/test/csit/tests/optf/has/optf_has_test.robot
+++ /dev/null
@@ -1,65 +0,0 @@
-*** Settings ***
-Library OperatingSystem
-Library RequestsLibrary
-Library json
-
-*** Variables ***
-${MESSAGE} {"ping": "ok"}
-${RESP_STATUS} "error"
-${RESP_MESSAGE_WRONG_VERSION} "conductor_template_version must be one of: 2016-11-01"
-${RESP_MESSAGE_WITHOUT_DEMANDS} Undefined Demand
-
-#global variables
-${generatedPlanId}
-
-*** Test Cases ***
-Check ConductorApi Docker Container
- [Documentation] It checks cassandra docker container is running
- ${rc} ${output}= Run and Return RC and Output docker ps
- Log To Console *********************
- Log To Console retrurn_code = ${rc}
- Log To Console output = ${output}
- Should Be Equal As Integers ${rc} 0
- Should Contain ${output} cond-api
-
-Check ConductorController Docker Container
- [Documentation] It checks zookeeper docker container is running
- ${rc} ${output}= Run and Return RC and Output docker ps
- Log To Console *********************
- Log To Console retrurn_code = ${rc}
- Log To Console output = ${output}
- Should Be Equal As Integers ${rc} 0
- Should Contain ${output} cond-cont
-
-Check ConductorSolver Docker Container
- [Documentation] It checks tomcat docker container is running
- ${rc} ${output}= Run and Return RC and Output docker ps
- Log To Console *********************
- Log To Console retrurn_code = ${rc}
- Log To Console output = ${output}
- Should Be Equal As Integers ${rc} 0
- Should Contain ${output} cond-solv
-
-Check ConductorReservation War Docker Container
- [Documentation] It checks music.war docker container is running
- ${rc} ${output}= Run and Return RC and Output docker ps
- Log To Console *********************
- Log To Console retrurn_code = ${rc}
- Log To Console output = ${output}
- Should Be Equal As Integers ${rc} 0
- Should Contain ${output} cond-resv
-
-Get Root Url
- [Documentation] It sends a REST GET request to root url
- Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT}
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
- ${resp}= Get Request optf-cond / headers=${headers}
- Log To Console *********************
- Log To Console response = ${resp}
- Log To Console body = ${resp.text}
- Should Be Equal As Integers ${resp.status_code} 200
-
-
-*** Keywords ***
-
-
diff --git a/test/csit/tests/vnfsdk-ice/ice-server/heat_template_empty.zip b/test/csit/tests/vnfsdk-ice/ice-server/heat_template_empty.zip
new file mode 100644
index 000000000..d1e6d9970
--- /dev/null
+++ b/test/csit/tests/vnfsdk-ice/ice-server/heat_template_empty.zip
Binary files differ
diff --git a/test/csit/tests/vnfsdk-ice/ice-server/heat_template_ok.zip b/test/csit/tests/vnfsdk-ice/ice-server/heat_template_ok.zip
new file mode 100644
index 000000000..4e89aba3e
--- /dev/null
+++ b/test/csit/tests/vnfsdk-ice/ice-server/heat_template_ok.zip
Binary files differ
diff --git a/test/csit/tests/vnfsdk-ice/ice-server/validation_test.robot b/test/csit/tests/vnfsdk-ice/ice-server/validation_test.robot
new file mode 100644
index 000000000..1a134b017
--- /dev/null
+++ b/test/csit/tests/vnfsdk-ice/ice-server/validation_test.robot
@@ -0,0 +1,69 @@
+*** 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