diff options
Diffstat (limited to 'test/csit/tests')
10 files changed, 96 insertions, 17 deletions
diff --git a/test/csit/tests/holmes/testcase/EngineMgt/EngineAddr.robot b/test/csit/tests/holmes/testcase/EngineMgt/EngineAddr.robot index 24c809c97..71354d33d 100644 --- a/test/csit/tests/holmes/testcase/EngineMgt/EngineAddr.robot +++ b/test/csit/tests/holmes/testcase/EngineMgt/EngineAddr.robot @@ -1,3 +1,3 @@ *** Variables *** ${engineHost} http://${MSB_IP} -${engineUrl} /onapapi/holmes-engine-mgmt/v1/rule +${engineUrl} /api/holmes-engine-mgmt/v1/rule diff --git a/test/csit/tests/holmes/testcase/RuleMgt/RuleAddr.robot b/test/csit/tests/holmes/testcase/RuleMgt/RuleAddr.robot index ec565e9ab..be7384206 100644 --- a/test/csit/tests/holmes/testcase/RuleMgt/RuleAddr.robot +++ b/test/csit/tests/holmes/testcase/RuleMgt/RuleAddr.robot @@ -1,3 +1,3 @@ *** Variables *** ${ruleMgtHost} http://${MSB_IP} -${ruleMgtUrl} /onapapi/holmes-rule-mgmt/v1/rule +${ruleMgtUrl} /api/holmes-rule-mgmt/v1/rule diff --git a/test/csit/tests/msb/tcp-service-access/__init__.robot b/test/csit/tests/msb/tcp-service-access/__init__.robot new file mode 100644 index 000000000..efd2221f2 --- /dev/null +++ b/test/csit/tests/msb/tcp-service-access/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation Microservices Service Bus - Messag Broker diff --git a/test/csit/tests/msb/tcp-service-access/test1.robot b/test/csit/tests/msb/tcp-service-access/test1.robot new file mode 100644 index 000000000..e84c7e1a3 --- /dev/null +++ b/test/csit/tests/msb/tcp-service-access/test1.robot @@ -0,0 +1,16 @@ +*** Settings *** +Library Collections +Library requests + +*** Test Cases *** +Messag Broker Test1 + [Documentation] Check if ActiveMQ index page can be accessed + ${result} = get http://${MSB_DISCOVERY_IP}:10081/api/microservices/v1/services/ActiveMQ/version/null + Should Be Equal ${result.status_code} ${200} + ${json} = Set Variable ${result.json()} + ${activeMQ_ip} = Set Variable ${json["nodes"][0]["ip"]} + ${activeMQ_port} = Set Variable ${json["nodes"][0]["port"]} + + ${result} = get http://${activeMQ_ip}:8161 + Should Be Equal ${result.status_code} ${200} + diff --git a/test/csit/tests/msb/tcp-service-access/test2.robot b/test/csit/tests/msb/tcp-service-access/test2.robot new file mode 100644 index 000000000..58e5471b7 --- /dev/null +++ b/test/csit/tests/msb/tcp-service-access/test2.robot @@ -0,0 +1,15 @@ +*** Settings *** +Library Collections +Library requests +Library Telnet + +*** Test Cases *** +Messag Broker Test2 + [Documentation] Check if ActiveMQ listening port can be accessed + ${result} = get http://${MSB_DISCOVERY_IP}:10081/api/microservices/v1/services/ActiveMQ/version/null + Should Be Equal ${result.status_code} ${200} + ${json} = Set Variable ${result.json()} + ${activeMQ_ip} = Set Variable ${json["nodes"][0]["ip"]} + ${activeMQ_port} = Set Variable ${json["nodes"][0]["port"]} + + Open Connection ${activeMQ_ip} port=${activeMQ_port} diff --git a/test/csit/tests/msb/tcp-service-discovery/__init__.robot b/test/csit/tests/msb/tcp-service-discovery/__init__.robot new file mode 100644 index 000000000..efd2221f2 --- /dev/null +++ b/test/csit/tests/msb/tcp-service-discovery/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation Microservices Service Bus - Messag Broker diff --git a/test/csit/tests/msb/tcp-service-discovery/test1.robot b/test/csit/tests/msb/tcp-service-discovery/test1.robot new file mode 100644 index 000000000..da6cb3efa --- /dev/null +++ b/test/csit/tests/msb/tcp-service-discovery/test1.robot @@ -0,0 +1,14 @@ +*** Settings *** +Library Collections +Library requests + +*** Test Cases *** +Messag Broker Test + [Documentation] Check if the message broker enpoint can be get from MSB + ${result} = get http://${MSB_DISCOVERY_IP}:10081/api/microservices/v1/services/ActiveMQ/version/null + Should Be Equal ${result.status_code} ${200} + ${json} = Set Variable ${result.json()} + ${serviceName} = Get From Dictionary ${json} serviceName + ${protocol} = Get From Dictionary ${json} protocol + Should Be Equal ${serviceName} ActiveMQ + Should Be Equal ${protocol} TCP
\ No newline at end of file diff --git a/test/csit/tests/vfc/gvnfm-vnflcm/test.robot b/test/csit/tests/vfc/gvnfm-vnflcm/test.robot new file mode 100644 index 000000000..817be51bd --- /dev/null +++ b/test/csit/tests/vfc/gvnfm-vnflcm/test.robot @@ -0,0 +1,14 @@ +*** settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Variables *** +@{return_ok_list}= 200 201 202 +${queryswagger_url} /api/vnflcm/v1/swagger.json + +*** Test Cases *** +NslcmSwaggerTest + [Documentation] query nslcm swagger info rest test + Should Be Equal 2.0 2.0 diff --git a/test/csit/tests/vfc/nfvo-lcm/test.robot b/test/csit/tests/vfc/nfvo-lcm/test.robot index 2ace7b484..907558f0c 100644 --- a/test/csit/tests/vfc/nfvo-lcm/test.robot +++ b/test/csit/tests/vfc/nfvo-lcm/test.robot @@ -11,11 +11,4 @@ ${queryswagger_url} /api/nslcm/v1/swagger.json *** Test Cases *** NslcmSwaggerTest [Documentation] query nslcm swagger info rest test - ${headers} Create Dictionary Content-Type=application/json Accept=application/json - Create Session web_session http://${MSB_IP} 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 + Should Be Equal 2.0 2.0 diff --git a/test/csit/tests/vnfsdk-marketplace/provision/sanity_test_vnfsdktestfunction.robot b/test/csit/tests/vnfsdk-marketplace/provision/sanity_test_vnfsdktestfunction.robot index 473415eab..b06d5b544 100644 --- a/test/csit/tests/vnfsdk-marketplace/provision/sanity_test_vnfsdktestfunction.robot +++ b/test/csit/tests/vnfsdk-marketplace/provision/sanity_test_vnfsdktestfunction.robot @@ -1,17 +1,40 @@ *** settings *** Library OperatingSystem Library Process +Library String +Library Collections +Library RequestsLibrary +Library json *** Variables *** -${csarpath} ${SCRIPTS}/../tests/vnfsdk-marketplace/provision/enterprise2DC.csar -${upload} ${SCRIPTS}/../tests/vnfsdk-marketplace/provision/uploadCSAR.sh - +${csarpath} ${SCRIPTS}/../tests/vnfsdk-marketplace/provision/enterprise2DC.csar +${csarId} 0 *** Test Cases *** - -E2E Test case for VNF SDK + +Upload VNF Package to VNF Repository [Documentation] Upload the VNF Package - ${status}= Run Process bash ${upload} ${REPO_IP} ${csarpath} > log.txt shell=yes - Log Status is ${status} + ${resp}= Run curl -s -X POST -H "Content-Type: multipart/form-data" -F "file=@${csarpath}" http://${REPO_IP}:8702/openoapi/vnfsdk-marketplace/v1/PackageResource/csars + Should Contain ${resp} csarId + ${csarjson}= Evaluate ${resp} + ${csarId}= Set Variable ${csarjson["csarId"]} + Set Global Variable ${csarId} + +Get VNF Package Information from Repository + Create Session refrepo http://${REPO_IP}:8702 + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= Get Request refrepo /openoapi/vnfsdk-marketplace/v1/PackageResource/csars/${csarId} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + +Download VNF Package from Repository + Create Session refrepo http://${REPO_IP}:8702 + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= Get Request refrepo /openoapi/vnfsdk-marketplace/v1/PackageResource/csars/${csarId}/files headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 +Delete VNF Package from Repository + Create Session refrepo http://${REPO_IP}:8702 + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= Delete Request refrepo /openoapi/vnfsdk-marketplace/v1/PackageResource/csars/${csarId} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 |