diff options
Diffstat (limited to 'tests')
34 files changed, 533 insertions, 357 deletions
diff --git a/tests/aaf/aaf-sms-suite/aaf-sms-test.robot b/tests/aaf/aaf-sms-suite/aaf-sms-test.robot index 78e35222..a88b84f7 100644 --- a/tests/aaf/aaf-sms-suite/aaf-sms-test.robot +++ b/tests/aaf/aaf-sms-suite/aaf-sms-test.robot @@ -1,94 +1,69 @@ *** Settings *** +Suite Setup Run keywords SMS Check SMS API Docker Container Created header Created session Library OperatingSystem Library RequestsLibrary -Library json *** Variables *** -${MESSAGE} {"ping": "ok"} -#global variables +*** Test Cases *** +Create Domain + [Template] Post template + /v1/sms/domain create_domain.json + /v1/sms/domain/curltestdomain/secret create_secret.json +Get information from Domain + [Template] Get template + /v1/sms/quorum/status + /v1/sms/domain/curltestdomain/secret + /v1/sms/domain/curltestdomain/secret/curltestsecret1 -*** Test Cases *** -SMS Check SMS API Docker Container - [Documentation] Checks if SMS 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} nexus3.onap.org:10001/onap/aaf/sms +Delete from Domain + [Template] Delete template + /v1/sms/domain/curltestdomain/secret/curltestsecret1 + /v1/sms/domain/curltestdomain -SMS GetStatus - [Documentation] Gets Backend Status - Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Get Request SMS /v1/sms/quorum/status 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 *** +Created session + Create Session aaf_sms_session ${SMS_HOSTNAME}:${SMS_PORT} + Set Suite Variable ${suite_aaf_sms_session} aaf_sms_session -SMS CreateDomain - [Documentation] Creates a Secret Domain to hold Secrets - Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} - ${data} Get Binary File ${CURDIR}${/}data${/}create_domain.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Post Request SMS /v1/sms/domain 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} 201 +Created header + ${headers}= Create Dictionary Content-Type=application/json Accept=application/json + Set Suite Variable ${suite_headers} ${headers} -SMS CreateSecret - [Documentation] Create A Secret within the Domain - Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} - ${data} Get Binary File ${CURDIR}${/}data${/}create_secret.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Post Request SMS /v1/sms/domain/curltestdomain/secret data=${data} headers=${headers} +Delete template + [Documentation] Deletes from Domain + [Arguments] ${topic} + ${resp}= Delete Request ${suite_aaf_sms_session} ${topic} headers=${suite_headers} Log To Console ********************* Log To Console response = ${resp} Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 201 + Should Be Equal As Integers ${resp.status_code} 204 -SMS ListSecret - [Documentation] Lists all Secret Names within Domain - Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Get Request SMS /v1/sms/domain/curltestdomain/secret headers=${headers} +Post template + [Documentation] Create A Domain/Secret Names + [Arguments] ${topic} ${file} + ${data} Get Binary File ${CURDIR}${/}data${/}${file} + ${resp}= Post Request ${suite_aaf_sms_session} ${topic} data=${data} headers=${suite_headers} Log To Console ********************* Log To Console response = ${resp} Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 + Should Be Equal As Integers ${resp.status_code} 201 -SMS GetSecret - [Documentation] Gets a single Secret with Values from Domain - Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Get Request SMS /v1/sms/domain/curltestdomain/secret/curltestsecret1 headers=${headers} +Get template + [Documentation] Gets from Domain + [Arguments] ${topic} + ${resp}= Get Request ${suite_aaf_sms_session} ${topic} headers=${suite_headers} Log To Console ********************* Log To Console response = ${resp} Log To Console body = ${resp.text} Should Be Equal As Integers ${resp.status_code} 200 -SMS DeleteSecret - [Documentation] Deletes a Secret referenced by Name from Domain - Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Delete Request SMS /v1/sms/domain/curltestdomain/secret/curltestsecret1 headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 204 - -SMS DeleteDomain - [Documentation] Deletes a Domain referenced by Name - Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Delete Request SMS /v1/sms/domain/curltestdomain headers=${headers} +SMS Check SMS API Docker Container + [Documentation] Checks if SMS docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 204 - -*** Keywords *** + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} nexus3.onap.org:10001/onap/aaf/sms diff --git a/tests/aaf/aafapi/aafapi.robot b/tests/aaf/aafapi/aafapi.robot index b1f8e746..93b6ce36 100644 --- a/tests/aaf/aafapi/aafapi.robot +++ b/tests/aaf/aafapi/aafapi.robot @@ -6,58 +6,34 @@ Library Collections Library String *** Variables *** -${TARGETURL_NAMESPACE} http://${AAF_IP}:8101/authz/nss/org.openecomp -${TARGETURL_PERMS} http://${AAF_IP}:8101/authz/perms/user/dgl@openecomp.org -${TARGETURL_ROLES} http://${AAF_IP}:8101/authz/roles/user/dgl@openecomp.org -${username} dgl@openecomp.org -${password} ecomp_admin +${TARGETURL_NAMESPACE} https://${AAF_IP}:8100/authz/nss/org.osaaf.people +${TARGETURL_PERMS} https://${AAF_IP}:8100/authz/perms/user/aaf_admin@people.osaaf.org +${TARGETURL_ROLES} https://${AAF_IP}:8100/authz/roles/user/aaf_admin@people.osaaf.org +${username} aaf_admin@people.osaaf.org +${password} demo123456! *** Test Cases *** View Namesapce [Tags] get - CreateSession aaf http://${AAF_IP}:8101 - &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json - ${resp}= Get Request aaf /authz/nss/org.openecomp headers=&{headers} + CreateSession aaf https://${AAF_IP}:8100 + &{headers}= Create Dictionary Authorization=Basic YWFmX2FkbWluQHBlb3BsZS5vc2FhZi5vcmc6ZGVtbzEyMzQ1NiE= Content-Type=application/json Accept=application/json + ${resp}= Get Request aaf /authz/nss/org.osaaf.people headers=&{headers} Should Be Equal As Strings ${resp.status_code} 200 log 'JSON Response Code :'${resp.text} View by User Permission [Tags] get - CreateSession aaf http://${AAF_IP}:8101 - &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json - ${resp}= Get Request aaf authz/perms/user/dgl@openecomp.org headers=&{headers} + CreateSession aaf https://${AAF_IP}:8100 + &{headers}= Create Dictionary Authorization=Basic YWFmX2FkbWluQHBlb3BsZS5vc2FhZi5vcmc6ZGVtbzEyMzQ1NiE= Content-Type=application/json Accept=application/json + ${resp}= Get Request aaf authz/perms/user/aaf_admin@people.osaaf.org headers=&{headers} Should Be Equal As Strings ${resp.status_code} 200 log 'JSON Response Code :'${resp.text} View by User Role [Tags] get - CreateSession aaf http://${AAF_IP}:8101 - &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json - ${resp}= Get Request aaf authz/roles/user/dgl@openecomp.org headers=&{headers} + CreateSession aaf https://${AAF_IP}:8100 + &{headers}= Create Dictionary Authorization=Basic YWFmX2FkbWluQHBlb3BsZS5vc2FhZi5vcmc6ZGVtbzEyMzQ1NiE= Content-Type=application/json Accept=application/json + ${resp}= Get Request aaf authz/roles/user/aaf_admin@people.osaaf.org headers=&{headers} Should Be Equal As Strings ${resp.status_code} 200 - log 'JSON Response Code :'${resp.text} - -Cleanup Namespace ( 424 Response - Delete dependencies and try again) - [Tags] delete - CreateSession aaf http://${AAF_IP}:8101 - &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json - ${resp}= Delete Request aaf authz/ns/org.openecomp.dmaapBC headers=&{headers} - Should Be Equal As Strings ${resp.status_code} 424 - log 'JSON Response Code :'${resp.text} - -Add Data ( Add Admin to Namespace Explicit ) - [Tags] post - CreateSession aaf http://${AAF_IP}:8101 - &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json - ${resp}= Post Request aaf authz/ns/org.openecomp.dmaapBC/admin/alexD@openecomp.org headers=&{headers} - Should Be Equal As Strings ${resp.status_code} 403 - log 'JSON Response Code :'${resp.text} - -View Explicit Permission - [Tags] post - CreateSession aaf http://${AAF_IP}:8101 - &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json - ${resp}= Post Request aaf authz/perms/user/m99751@dmaapBC.openecomp.org headers=&{headers} - Should Be Equal As Strings ${resp.status_code} 406 - log 'JSON Response Code :'${resp.text}
\ No newline at end of file + log 'JSON Response Code :'${resp.text}
\ No newline at end of file diff --git a/tests/appc/healthcheck/gettime.robot b/tests/appc/healthcheck/APPC_GLOBAL_KEYWORDS.robot index 9f376f9b..d59fefa8 100644 --- a/tests/appc/healthcheck/gettime.robot +++ b/tests/appc/healthcheck/APPC_GLOBAL_KEYWORDS.robot @@ -3,12 +3,10 @@ Library Selenium2Library Library OperatingSystem Library DateTime Library String -##Library HttpLibrary.HTTP Library Collections *** Keywords *** - Get Server time [Documentation] Getting server time to update the json request [Arguments] ${RequestFile} @@ -16,10 +14,10 @@ Get Server time ${date}= Get Current Date time_zone=local result_format=%Y-%m-%dT%H:%M:%S.%fZ exclude_millis=False #updating the request file with the server time - ${file_content}= OperatingSystem.Get File ${RequestFile} - @{list}= Split to lines ${file_content} - ${data}= Get from list ${list} 5 - @{splitted_string}= Split String ${data} : 1 + ${file_content}= Get File ${RequestFile} + @{list}= Split to lines ${file_content} + ${data}= Get from list ${list} 5 + @{splitted_string}= Split String ${data} : 1 ${time}= Get From List ${splitted_string} 1 Log ${time} @{splitted_string_time}= Split String ${time} " 2 @@ -27,14 +25,9 @@ Get Server time Log ${times1} ${replaced_string}= Replace String ${data} ${times1} ${date} @{list1}= Split to lines ${file_content} - Remove from list ${list1} 5 - Insert into list ${list1} 5 ${replaced_string} - Remove File ${RequestFile} - :FOR ${line} IN @{list1} - \ Append to File ${RequestFile} ${line} encoding=UTF-8 - \ Append to File ${RequestFile} ${\n} encoding=UTF-8 - - - - -
\ No newline at end of file + Remove from list ${list1} 5 + Insert into list ${list1} 5 ${replaced_string} + Remove File ${RequestFile} + :FOR ${line} IN @{list1} + \ Append to File ${RequestFile} ${line} encoding=UTF-8 + \ Append to File ${RequestFile} ${\n} encoding=UTF-8 diff --git a/tests/appc/healthcheck/APPC_GLOBAL_VARIABLES.robot b/tests/appc/healthcheck/APPC_GLOBAL_VARIABLES.robot index b869434f..9b399228 100644 --- a/tests/appc/healthcheck/APPC_GLOBAL_VARIABLES.robot +++ b/tests/appc/healthcheck/APPC_GLOBAL_VARIABLES.robot @@ -5,6 +5,9 @@ Documentation store all properties that can change or are used in multipl *** Variables *** -${GLOBAL_VNF_RESTART_REQUESTFILE} ${CURDIR}/LCM_VNF_RESTART_REQUEST.txt -${GLOBAL_VM_RESTART_REQUESTFILE} ${CURDIR}/LCM_VM_RESTART_REQUEST.txt -${GLOBAL_HEALTHCHECK_REQUESTFILE} ${CURDIR}/LCM_VM_HEALTHCHECK_REQUEST.txt
\ No newline at end of file +#${GLOBAL_VNF_RESTART_REQUESTFILE} ${CURDIR}/LCM_VNF_RESTART_REQUEST.txt +#${GLOBAL_VM_RESTART_REQUESTFILE} ${CURDIR}/LCM_VM_RESTART_REQUEST.txt +#${GLOBAL_HEALTHCHECK_REQUESTFILE} ${CURDIR}/LCM_VM_HEALTHCHECK_REQUEST.txt +${GLOBAL_APPC_ADMIN_USER} admin +${GLOBAL_APPC_ADMIN_PASS} Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U +# to try to fire up the test again because the first one was failure in 90 minutes diff --git a/tests/appc/healthcheck/APPC_Netstat.robot b/tests/appc/healthcheck/APPC_Netstat.robot index 285fc372..200a4966 100644 --- a/tests/appc/healthcheck/APPC_Netstat.robot +++ b/tests/appc/healthcheck/APPC_Netstat.robot @@ -1,8 +1,11 @@ *** Settings *** Library OperatingSystem +Library String *** Test Cases *** APPC Netstat [Documentation] Checking the active ports - ${output}= Run netstat -a | grep -E 8282 | grep LISTEN + ${output}= Run netstat -a | grep -E ":8282 " | grep LISTEN Log To Console ${output} + ${line_count}= Get Line Count ${output} + Should Be Equal As Strings ${line_count} 1 diff --git a/tests/appc/healthcheck/LCM_HEALTHCHECK_TIMESTAMP.robot b/tests/appc/healthcheck/LCM_HEALTHCHECK_TIMESTAMP.robot index 1cea75e9..8c75addc 100644 --- a/tests/appc/healthcheck/LCM_HEALTHCHECK_TIMESTAMP.robot +++ b/tests/appc/healthcheck/LCM_HEALTHCHECK_TIMESTAMP.robot @@ -1,52 +1,42 @@ *** Settings *** Library Selenium2Library -Library OperatingSystem Library XvfbRobot -Resource APPC_GLOBAL_VARIABLES.robot -Resource gettime.robot +Resource ${CURDIR}/APPC_GLOBAL_VARIABLES.robot +Resource ${CURDIR}/APPC_GLOBAL_KEYWORDS.robot -*** Variable *** -${ResponseCode} -${var} *** Test Cases *** - APPC LCM API HEALTHCHECK - [Documentation] APPC LCM API HEALTHCHECK - Start Virtual Display 1920 1080 - Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html chrome -# Maximize Browser Window -# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img - - Reload Page - -# Wait Until Page Contains Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] - -# Set Selenium Speed 60 -# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] - - -# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')] -# Set Selenium Speed 60 -# Click link xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]/following::li[5]/ul/li/div[1]/h3/span[2]/a -# Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0"]/div[1]/h3/span[2]/a - -# Get Server time ${GLOBAL_HEALTHCHECK_REQUESTFILE} -# ${file_content}= OperatingSystem.Get File ${GLOBAL_HEALTHCHECK_REQUESTFILE} + [Documentation] APPC LCM API HEALTHCHECK + [Teardown] Close All Browsers + Start Virtual Display 1920 1080 + Open Browser http://${GLOBAL_APPC_ADMIN_USER}:${GLOBAL_APPC_ADMIN_PASS}@localhost:8282/apidoc/explorer/index.html chrome + Set Window Size 1920 1080 +# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img + + Reload Page + +# Wait Until Page Contains Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] + +# Set Selenium Speed 60 +# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] + +# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')] +# Set Selenium Speed 60 +# Click link xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]/following::li[5]/ul/li/div[1]/h3/span[2]/a +# Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0"]/div[1]/h3/span[2]/a + +# Get Server time ${GLOBAL_HEALTHCHECK_REQUESTFILE} +# ${file_content}= OperatingSystem.Get File ${GLOBAL_HEALTHCHECK_REQUESTFILE} -# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table -# Set Selenium Speed 90 -# Input Text xpath=(.//*[contains(text(),'(health-check)input-TOP')])[1]/following::textarea[1] ${file_content} -# Input Text xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table//tbody/tr/td[2]/textarea ${file_content} - -# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::form/div[2]/input[1] -# Set Selenium Speed 90 -# Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/form/div[2]/input - -## ${var}= Get Value xpath= //*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/div[2]/div[3]/pre -## Element Text Should Be xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/div[2]/div[3]/pre[1][text()='200'] 200 expected - -Tear Down - - [Documentation] Close all browsers - Close All Browsers +# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table +# Set Selenium Speed 90 +# Input Text xpath=(.//*[contains(text(),'(health-check)input-TOP')])[1]/following::textarea[1] ${file_content} +# Input Text xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table//tbody/tr/td[2]/textarea ${file_content} + +# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::form/div[2]/input[1] +# Set Selenium Speed 90 +# Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/form/div[2]/input + +## ${var}= Get Value xpath= //*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/div[2]/div[3]/pre +## Element Text Should Be xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/div[2]/div[3]/pre[1][text()='200'] 200 expected diff --git a/tests/appc/healthcheck/LCM_VM_RESTART_TIMESTAMP.robot b/tests/appc/healthcheck/LCM_VM_RESTART_TIMESTAMP.robot index 7968d552..f49af460 100644 --- a/tests/appc/healthcheck/LCM_VM_RESTART_TIMESTAMP.robot +++ b/tests/appc/healthcheck/LCM_VM_RESTART_TIMESTAMP.robot @@ -1,47 +1,39 @@ *** Settings *** Library Selenium2Library -Library OperatingSystem -Library XvfbRobot -Resource APPC_GLOBAL_VARIABLES.robot -Resource gettime.robot +Library XvfbRobot +Resource ${CURDIR}/APPC_GLOBAL_VARIABLES.robot +Resource ${CURDIR}/APPC_GLOBAL_KEYWORDS.robot -*** Variable *** -${ResponseCode} -${var} *** Test Cases *** APPC LCM API VM RESTART - [Documentation] APPC LCM API VM RESTART - Start Virtual Display 1920 1080 - Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html chrome -# Maximize Browser Window -# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img - - Reload Page - -# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a -# Set Selenium Speed 60 -# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] - -# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')] -# Set Selenium Speed 60 -# Click Element xpath=.//*[contains(text(),'appc-provider-lcm:restart')] - + [Documentation] APPC LCM API VM RESTART + [Teardown] Close All Browsers + Start Virtual Display 1920 1080 + Open Browser http://${GLOBAL_APPC_ADMIN_USER}:${GLOBAL_APPC_ADMIN_PASS}@localhost:8282/apidoc/explorer/index.html chrome + Set Window Size 1920 1080 +# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img + + Reload Page + +# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a +# Set Selenium Speed 60 +# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] + +# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')] +# Set Selenium Speed 60 +# Click Element xpath=.//*[contains(text(),'appc-provider-lcm:restart')] + # Get Server time ${GLOBAL_VM_RESTART_REQUESTFILE} # ${file_content}= OperatingSystem.Get File ${GLOBAL_VM_RESTART_REQUESTFILE} # Wait Until Page Contains Element xpath=//td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] -# Set Selenium Speed 90 -# Input Text xpath=(.//*[contains(text(),'(restart)input-TOP')])[5]/following::textarea[1] ${file_content} -# Input Text xpath= //td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] ${file_content} - -# Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::form/div[2]/input[1] - -# ${var}= Get Value xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre -# Element Text Should Be xpath=//*[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[text()='Response Code'][1]//following-sibling::div//pre[1][text()='200'] 200 expected - - -Tear Down - [Documentation] Close all browsers - Close All Browsers +# Set Selenium Speed 90 +# Input Text xpath=(.//*[contains(text(),'(restart)input-TOP')])[5]/following::textarea[1] ${file_content} +# Input Text xpath= //td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] ${file_content} + +# Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::form/div[2]/input[1] + +# ${var}= Get Value xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre +# Element Text Should Be xpath=//*[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[text()='Response Code'][1]//following-sibling::div//pre[1][text()='200'] 200 expected diff --git a/tests/appc/healthcheck/LCM_VNF_RESTART_TIMESTAMP.robot b/tests/appc/healthcheck/LCM_VNF_RESTART_TIMESTAMP.robot index 93c72d72..ed85d4a1 100644 --- a/tests/appc/healthcheck/LCM_VNF_RESTART_TIMESTAMP.robot +++ b/tests/appc/healthcheck/LCM_VNF_RESTART_TIMESTAMP.robot @@ -1,50 +1,40 @@ *** Settings *** Library Selenium2Library -Library OperatingSystem -Library XvfbRobot +Library XvfbRobot Resource ${CURDIR}/APPC_GLOBAL_VARIABLES.robot -Resource ${CURDIR}/gettime.robot +Resource ${CURDIR}/APPC_GLOBAL_KEYWORDS.robot - -*** Variable *** -${ResponseCode} -${var} - *** Test Cases *** - APPC LCM API VNF RESTART - [Documentation] APPC LCM API VNF RESTART - Start Virtual Display 1920 1080 - Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html chrome -# Maximize Browser Window -# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img - - Reload Page - -# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a -# Set Selenium Speed 60 -# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] - - -# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')] -# Set Selenium Speed 60 -# Click Element xpath=.//*[contains(text(),'appc-provider-lcm:restart')] - -# Get Server time ${GLOBAL_VNF_RESTART_REQUESTFILE} -# ${file_content}= OperatingSystem.Get File ${GLOBAL_VNF_RESTART_REQUESTFILE} + [Documentation] APPC LCM API VNF RESTART + [Teardown] Close All Browsers +# Set the timeout because Open Browser ended with timeout... + Set Selenium Timeout 5 seconds + Start Virtual Display 1920 1080 + Open Browser http://${GLOBAL_APPC_ADMIN_USER}:${GLOBAL_APPC_ADMIN_PASS}@localhost:8282/apidoc/explorer/index.html chrome + Set Window Size 1920 1080 +# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img + + Reload Page + +# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a +# Set Selenium Speed 60 +# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] + +# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')] +# Set Selenium Speed 60 +# Click Element xpath=.//*[contains(text(),'appc-provider-lcm:restart')] + +# Get Server time ${GLOBAL_VNF_RESTART_REQUESTFILE} +# ${file_content}= OperatingSystem.Get File ${GLOBAL_VNF_RESTART_REQUESTFILE} # Wait Until Page Contains Element xpath=//td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] -# Set Selenium Speed 90 -# Input Text xpath=(.//*[contains(text(),'(restart)input-TOP')])[5]/following::textarea[1] ${file_content} -# Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::form/div[2]/input[1] - -# Input Text xpath= //td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] ${file_content} - -# ${var}= Get Value xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre -# Element Text Should Be xpath=//*[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[text()='Response Code'][1]//following-sibling::div//pre[1][text()='200'] 200 expected - - -Tear Down - [Documentation] Close all browsers - Close All Browsers +# Set Selenium Speed 90 +# Input Text xpath=(.//*[contains(text(),'(restart)input-TOP')])[5]/following::textarea[1] ${file_content} +# Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::form/div[2]/input[1] + +# Input Text xpath= //td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] ${file_content} + +# ${var}= Get Value xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre +# Element Text Should Be xpath=//*[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[text()='Response Code'][1]//following-sibling::div//pre[1][text()='200'] 200 expected diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot b/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot index 7b99fb0d..60580083 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot +++ b/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot @@ -50,7 +50,7 @@ ${DCAE_APP_API_MESSAGES_PATH} /messages/all ${DCAE_APP_API_MESSAGES_COUNT_PATH} ${DCAE_APP_API_MESSAGES_PATH}/count ${DCAE_APP_API_MESSAGES_VALIDATION_PATH} ${DCAE_APP_API_MESSAGES_PATH}/validate -${ROUTED_MESSAGES_TOPIC} test-hv-ran-meas +${ROUTED_MESSAGES_TOPIC} TEST_HV_VES_PERF3GPP ${VES_HV_RESOURCES} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources ${VES_HV_CONFIGURATION_JSON_FILEPATH} ${VES_HV_RESOURCES}/ves-hv-configuration.json diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json index 9aca4015..25e7272c 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json index 642c7d56..92b0deca 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json index 642c7d56..92b0deca 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json index f38e9aa0..3b57160f 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json index 22d48c5f..612bfedf 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -24,7 +24,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -46,7 +46,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json index f38e9aa0..3b57160f 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json index a7d22190..6d63acc8 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -24,7 +24,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -46,7 +46,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json index 89f3e067..dc160e51 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json index 60c81a89..49d9bd93 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json index 54836bf3..4296d485 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -24,7 +24,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -46,7 +46,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json index f38e9aa0..3b57160f 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json index b3aada5b..43e90874 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -24,7 +24,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "FAULT", + "domain": "fault", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -46,7 +46,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json index b9e1a4b5..9ef72497 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json @@ -2,8 +2,8 @@ "dmaap.kafkaBootstrapServers": "kafka:9092", "collector.routing": [ { - "fromDomain": "HVMEAS", - "toTopic": "test-hv-ran-meas" + "fromDomain": "perf3gpp", + "toTopic": "TEST_HV_VES_PERF3GPP" } ] }
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/resources/prh_library.robot b/tests/dcaegen2/prh-testcases/resources/prh_library.robot index 73ce2a2c..fcad88d7 100644 --- a/tests/dcaegen2/prh-testcases/resources/prh_library.robot +++ b/tests/dcaegen2/prh-testcases/resources/prh_library.robot @@ -21,7 +21,7 @@ Invalid event processing ${data}= Get Data From File ${input_invalid_event_in_dmaap} Set event in DMaaP ${data} ${invalid_notification}= Create invalid notification ${data} - ${notification}= Catenate SEPARATOR= \\n |org.onap.dcaegen2.services.prh.exceptions.DmaapNotFoundException: Incorrect json, consumerDmaapModel can not be created: ${invalid_notification} + ${notification}= Catenate SEPARATOR= \\n |Incorrect json, consumerDmaapModel can not be created: ${invalid_notification} Wait Until Keyword Succeeds 100x 100ms Check PRH log ${notification} Valid event processing diff --git a/tests/dmaap-datarouter/dr-suite/dr-suite.robot b/tests/dmaap-datarouter/dr-suite/dr-suite.robot index fcac2026..d00bddc7 100755 --- a/tests/dmaap-datarouter/dr-suite/dr-suite.robot +++ b/tests/dmaap-datarouter/dr-suite/dr-suite.robot @@ -10,7 +10,8 @@ ${TARGET_URL} https://${DR_PROV_IP}:8443 ${TARGET_URL_FEED} https://${DR_PROV_IP}:8443/feed/1 ${TARGET_URL_SUBSCRIBE} https://${DR_PROV_IP}:8443/subscribe/1 ${TARGET_URL_SUBSCRIPTION} https://${DR_PROV_IP}:8443/subs/1 -${TARGET_URL_PUBLISH} https://${DR_NODE_IP}:8443/publish/1/csit_test +${TARGET_URL_PUBLISH_PROV} https://${DR_PROV_IP}:8443/publish/1/csit_test +${TARGET_URL_PUBLISH_NODE} https://${DR_NODE_IP}:8443/publish/1/csit_test ${CREATE_FEED_DATA} {"name": "CSIT_Test", "version": "m1.0", "description": "CSIT_Test", "business_description": "CSIT_Test", "suspend": false, "deleted": false, "changeowner": true, "authorization": {"classification": "unclassified", "endpoint_addrs": [], "endpoint_ids": [{"password": "rs873m", "id": "rs873m"}]}} ${UPDATE_FEED_DATA} {"name": "CSIT_Test", "version": "m1.0", "description": "UPDATED-CSIT_Test", "business_description": "CSIT_Test", "suspend": true, "deleted": false, "changeowner": true, "authorization": {"classification": "unclassified", "endpoint_addrs": [], "endpoint_ids": [{"password": "rs873m", "id": "rs873m"}]}} ${SUBSCRIBE_DATA} {"delivery":{ "url":"https://${DR_PROV_IP}:8080/", "user":"rs873m", "password":"rs873m", "use100":true}, "metadataOnly":false, "suspend":false, "groupid":29, "subscriber":"sg481n"} @@ -42,9 +43,10 @@ Run Publish Feed [Documentation] Publish to Feed [Timeout] 1 minute Sleep 10s Behaviour was noticed where feed was not created in time for publish to be sent - ${resp}= PutCall ${TARGET_URL_PUBLISH} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m - log ${TARGET_URL_PUBLISH} - log ${resp.text} + ${resp}= PutCall ${TARGET_URL_PUBLISH_PROV} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m + log ${TARGET_URL_PUBLISH_PROV} + Should Contain ${resp.headers['Location']} https://dmaap-dr-node:8443/publish/1/csit_test + ${resp}= PutCall ${TARGET_URL_PUBLISH_NODE} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m Should Be Equal As Strings ${resp.status_code} 204 log 'JSON Response Code:'${resp} @@ -94,23 +96,23 @@ Run Delete Feed PostCall [Arguments] ${url} ${data} ${content_type} ${user} ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type} - ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests + ${resp}= Evaluate requests.post('${url}', data='${data}', headers=${headers}, verify=False) requests [Return] ${resp} PutCall [Arguments] ${url} ${data} ${content_type} ${user} ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type} Authorization=Basic cnM4NzNtOnJzODczbQ== - ${resp}= Evaluate requests.put('${url}',data='${data}', headers=${headers},verify=False) requests + ${resp}= Evaluate requests.put('${url}', data='${data}', headers=${headers}, verify=False, allow_redirects=False) requests [Return] ${resp} GetCall [Arguments] ${url} ${content_type} ${user} ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type} - ${resp}= Evaluate requests.get('${url}', headers=${headers},verify=False) requests + ${resp}= Evaluate requests.get('${url}', headers=${headers}, verify=False) requests [Return] ${resp} DeleteCall [Arguments] ${url} ${user} ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} - ${resp}= Evaluate requests.delete('${url}', headers=${headers},verify=False) requests + ${resp}= Evaluate requests.delete('${url}', headers=${headers}, verify=False) requests [Return] ${resp} diff --git a/tests/optf-has/has/optf_has_test.robot b/tests/optf-has/has/optf_has_test.robot index 3b3ee7a0..8bd313a9 100644 --- a/tests/optf-has/has/optf_has_test.robot +++ b/tests/optf-has/has/optf_has_test.robot @@ -5,6 +5,11 @@ Library json *** Variables *** ${MESSAGE} {"ping": "ok"} +${BASIC} Basic +${Music_AUTHVALUE} Y29uZHVjdG9yOmMwbmR1Y3Qwcg== +${HAS_AUTHVALUE} YWRtaW4xOnBsYW4uMTU= +${Music_Auth} ${BASIC} ${Music_AUTHVALUE} +${HAS_Auth} ${BASIC} ${HAS_AUTHVALUE} ${RESP_STATUS} "error" ${RESP_MESSAGE_WRONG_VERSION} "conductor_template_version must be one of: 2016-11-01" ${RESP_MESSAGE_WITHOUT_DEMANDS} Undefined Demand @@ -54,7 +59,7 @@ Check Music War Docker Container 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 + &{headers}= Create Dictionary Authorization=${HAS_Auth} 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} @@ -109,7 +114,7 @@ Check ConductorData Docker Container 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 + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond / headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -121,7 +126,7 @@ Conductor AddHealthcheck Row Into Music [Documentation] It sends a REST PUT request to Music to inject healthcheck plan Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}healthcheck.json - &{headers}= Create Dictionary ns=conductor userId=conductor password=c0nduct0r Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary ns=conductor Authorization=${Music_Auth} userId=conductor password=c0nduct0r Content-Type=application/json Accept=application/json ${resp}= Put Request musicaas /MUSIC/rest/v2/keyspaces/conductor/tables/plans/rows?id=healthcheck data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -133,7 +138,7 @@ Conductor AddHealthcheck Row Into Music Healthcheck [Documentation] It sends a REST GET request to healthcheck url Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/healthcheck headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -144,7 +149,7 @@ SendPlanWithWrongVersion [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_wrong_version.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -159,7 +164,7 @@ SendPlanWithWrongVersion GetPlanWithWrongVersion [Documentation] It sends a REST GET request to capture error Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -175,7 +180,7 @@ SendPlanWithoutDemandSection [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_without_demand_section.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -190,7 +195,7 @@ SendPlanWithoutDemandSection GetPlanWithoutDemandSection [Documentation] It sends a REST GET request to capture error Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -206,7 +211,7 @@ SendPlanWithWrongConstraint [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_wrong_distance_constraint.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -221,7 +226,7 @@ SendPlanWithWrongConstraint GetPlanWithWrongConstraint [Documentation] It sends a REST GET request to capture error Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -238,7 +243,7 @@ SendPlanWithLatiAndLongi [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_lati_and_longi.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -253,7 +258,7 @@ SendPlanWithLatiAndLongi GetPlanWithLatiAndLongi [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -269,7 +274,7 @@ SendPlanWithShortDistanceConstraint [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_short_distance_constraint.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -284,7 +289,7 @@ SendPlanWithShortDistanceConstraint GetPlanWithShortDistanceConstraint [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -300,7 +305,7 @@ SendPlanWithVimFit [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_vim_fit.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -315,7 +320,7 @@ SendPlanWithVimFit GetPlanWithVimFit [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -331,7 +336,7 @@ SendPlanWithHpa [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -346,7 +351,7 @@ SendPlanWithHpa GetPlanWithHpa [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -362,7 +367,7 @@ SendPlanWithHpaSimple [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa_simple.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -377,7 +382,7 @@ SendPlanWithHpaSimple GetPlanWithHpaSimple [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -393,7 +398,7 @@ SendPlanWithHpaMandatory [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa_requirements_mandatory.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -408,7 +413,7 @@ SendPlanWithHpaMandatory GetPlanWithHpaMandatory [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -424,7 +429,7 @@ SendPlanWithHpaOptionals [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa_requirements_optionals.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -439,7 +444,7 @@ SendPlanWithHpaOptionals GetPlanWithHpaOptionals [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -455,7 +460,7 @@ SendPlanWithHpaUnmatched [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa_unmatched.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -470,7 +475,7 @@ SendPlanWithHpaUnmatched GetPlanWithHpaUnmatched [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -487,7 +492,7 @@ SendPlanWithHpaScoreMultiObj [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa_score_multi_objective.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -502,7 +507,7 @@ SendPlanWithHpaScoreMultiObj GetPlanWithHpaScoreMultiObj [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} diff --git a/tests/optf-osdf/osdf/__init__.robot b/tests/optf-osdf/osdf/__init__.robot new file mode 100644 index 00000000..fb654d7b --- /dev/null +++ b/tests/optf-osdf/osdf/__init__.robot @@ -0,0 +1,4 @@ +*** Settings *** +Documentation Integration - Suite 1 + + diff --git a/tests/optf-osdf/osdf/data/pci-opt-request.json b/tests/optf-osdf/osdf/data/pci-opt-request.json new file mode 100644 index 00000000..7ec9ab5f --- /dev/null +++ b/tests/optf-osdf/osdf/data/pci-opt-request.json @@ -0,0 +1,20 @@ +{ + "requestInfo": { + "transactionId": "xxx-xxx-xxxx", + "requestId": "yyy-yyy-yyyy", + "callbackUrl": "https://wiki.onap.org:5000/callbackUrl/", + "sourceId": "SO", + "requestType": "create", + "numSolutions": 1, + "optimizers": [ + "placement" + ], + "timeout": 600 + }, + "cellInfo": { + "networkId": "1000", + "cellIdList": [ + "cell0" + ] + } +}
\ No newline at end of file diff --git a/tests/optf-osdf/osdf/data/placement_request.json b/tests/optf-osdf/osdf/data/placement_request.json new file mode 100644 index 00000000..d9b16ca5 --- /dev/null +++ b/tests/optf-osdf/osdf/data/placement_request.json @@ -0,0 +1,102 @@ +{ + "requestInfo": { + "transactionId": "xxx-xxx-xxxx", + "requestId": "yyy-yyy-yyyy", + "callbackUrl": "https://wiki.onap.org:5000/callbackUrl/", + "sourceId": "SO", + "requestType": "create", + "numSolutions": 1, + "optimizers": ["placement"], + "timeout": 600 + }, + "placementInfo": { + "requestParameters": { "customerLatitude": 32.89748, "customerLongitude": -97.040443, "customerName": "xyz" }, + "subscriberInfo": {"globalSubscriberId": "xxx-xx-xxx", "subscriberName": "subscriber_x"}, + "placementDemands": [ + { + "resourceModuleName": "vGMuxInfra", + "serviceResourceId": "vGMuxInfra-xx", + "tenantId": "vGMuxInfra-tenant", + "resourceModelInfo": { + "modelInvariantId": "vGMuxInfra-modelInvariantId", + "modelVersionId": "vGMuxInfra-versionId", + "modelName": "vGMuxInfra-model", + "modelType": "resource", + "modelVersion": "1.0", + "modelCustomizationName": "vGMuxInfra-customeModelName" + } + }, + { + "resourceModuleName": "vG", + "serviceResourceId": "71d563e8-e714-4393-8f99-cc480144a05e", + "tenantId": "vG-tenant", + "resourceModelInfo": { + "modelInvariantId": "vG-modelInvariantId", + "modelVersionId": "vG-versionId", + "modelName": "vG-model", + "modelType": "resource", + "modelVersion": "1.0", + "modelCustomizationName": "vG-customeModelName" + }, + "existingCandidates": [ + { + "identifierType": "serviceInstanceId", + "cloudOwner": "", + "identifiers": ["gjhd-098-fhd-987"] + } + ], + "excludedCandidates": [ + { + "identifierType": "serviceInstanceId", + "cloudOwner": "", + "identifiers": ["gjhd-098-fhd-987"] + }, + { + "identifierType": "vimId", + "cloudOwner": "vmware", + "identifiers": ["NYMDT67"] + } + ], + "requiredCandidates": [ + { + "identifierType": "vimId", + "cloudOwner": "amazon", + "identifiers": ["TXAUS219"] + } + ] + } + ] + }, + "serviceInfo": { + "serviceInstanceId": "d61b2543-5914-4b8f-8e81-81e38575b8ec", + "serviceName": "vCPE", + "modelInfo": { + "modelInvariantId": "vCPE-invariantId", + "modelVersionId": "vCPE-versionId", + "modelName": "vCPE-model", + "modelType": "service", + "modelVersion": "1.0", + "modelCustomizationName": "vCPE-customeModelName" + } + }, + "licenseInfo": { + "licenseDemands": [ + { + "resourceModuleName": "vGMuxInfra", + "serviceResourceId": "vGMuxInfra-xx", + "resourceModelInfo": { + "modelInvariantId": "vGMuxInfra-modelInvariantId", + "modelVersionId": "vGMuxInfra-versionId", + "modelName": "vGMuxInfra-model", + "modelType": "resource", + "modelVersion": "1.0", + "modelCustomizationName": "vGMuxInfra-customeModelName" + }, + "existingLicenses": { + "entitlementPoolUUID": ["87257b49-9602-4ca1-9817-094e52bc873b", "43257b49-9602-4fe5-9337-094e52bc9435"], + "licenseKeyGroupUUID": ["87257b49-9602-4ca1-9817-094e52bc873b", "43257b49-9602-4fe5-9337-094e52bc9435"] + } + } + ] + } +}
\ No newline at end of file diff --git a/tests/optf-osdf/osdf/optf_osdf_setup.robot b/tests/optf-osdf/osdf/optf_osdf_setup.robot new file mode 100644 index 00000000..fdf7f3e3 --- /dev/null +++ b/tests/optf-osdf/osdf/optf_osdf_setup.robot @@ -0,0 +1,12 @@ +*** Settings *** +Documentation Suite description +Resource ./resources/common-keywords.robot + +*** Test Cases *** +Check OSDF_SIM Docker Container + [Documentation] It checks osdf_simulator docker container is running + Verify Docker RC Status osdf_sim + +Check OSDF Docker Container + [Documentation] It checks optf-osdf docker container is running + Verify Docker RC Status optf-osdf
\ No newline at end of file diff --git a/tests/optf-osdf/osdf/optf_osdf_test.robot b/tests/optf-osdf/osdf/optf_osdf_test.robot new file mode 100644 index 00000000..c3921d5c --- /dev/null +++ b/tests/optf-osdf/osdf/optf_osdf_test.robot @@ -0,0 +1,48 @@ +*** Settings *** +Library json +Library OperatingSystem +Resource ./resources/common-keywords.robot + +Suite Teardown Delete All Sessions + +*** Variables *** +${osdf_host} ${OSDF_HOSTNAME}:${OSDF_PORT} +&{placement_auth} = username=test password=testpwd +&{wrong_authorization} = username=test password=test +&{pci_auth}= username=pci_test password=pci_testpwd + +*** Test Cases *** +Healthcheck + [Documentation] It sends a REST GET request to healthcheck url + ${resp}= Http Get ${osdf_host} /api/oof/v1/healthcheck + Should Be Equal As Integers ${resp.status_code} 200 + +SendPlacementWithInvalidAuth + [Documentation] It sends a POST request to osdf fail authentication + ${data}= Get Binary File ${CURDIR}${/}data${/}placement_request.json + ${resp}= Http Post host=${osdf_host} restUrl=/api/oof/v1/placement data=${data} auth=${wrong_authorization} + ${response_json} json.loads ${resp.content} + Should Be Equal Unauthorized, check username and password ${response_json['serviceException']['text']} + Should Be Equal As Integers ${resp.status_code} 401 + +SendPlacementWithValidAuth + [Documentation] It sends a POST request to osdf with correct authentication + ${data}= Get Binary File ${CURDIR}${/}data${/}placement_request.json + ${resp}= Http Post host=${osdf_host} restUrl=/api/oof/v1/placement data=${data} auth=${placement_auth} + ${response_json} json.loads ${resp.content} + Should Be Equal As Integers ${resp.status_code} 202 + Should Be Equal accepted ${response_json['requestStatus']} + +#SendPCIOptimizationWithAuth +# [Documentation] It sends a POST request PCI Optimization service +# +# ${data}= Get Binary File ${CURDIR}${/}data${/}pci-opt-request.json +# ${resp}= Http Post host=${osdf_host} restUrl=/api/oof/v1/pci data=${data} auth=${pci_auth} +# ${response_json} json.loads ${resp.content} +# Should Be Equal As Integers ${resp.status_code} 202 +# Should Be Equal accepted ${response_json['requestStatus']} + + + + + diff --git a/tests/optf-osdf/osdf/resources/common-keywords.robot b/tests/optf-osdf/osdf/resources/common-keywords.robot new file mode 100644 index 00000000..ea45f09d --- /dev/null +++ b/tests/optf-osdf/osdf/resources/common-keywords.robot @@ -0,0 +1,50 @@ +*** Settings *** +Documentation Suite description +Library OperatingSystem +Library RequestsLibrary +Library json +Library RequestsLibrary +*** Variables *** +&{headers}= Content-Type=application/json Accept=application/json +*** Keywords *** +Verify Docker RC Status + [Documentation] Method to verify whether docker instance is up and running + [Arguments] ${process_name} + ${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} ${process_name} + +Http Get + [Documentation] Wrapper for Http GET + [Arguments] ${host} ${restUrl} + Create Session optf-osdf ${host} + ${resp}= Get Request optf-osdf ${restUrl} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + [Return] ${resp} + +Http Post + [Documentation] Wrapper for Http POST + [Arguments] ${host} ${restUrl} ${auth} ${data} + ${pci_auth}= Create List ${auth['username']} ${auth['password']} + Create Session optf-osdf ${host} headers=${headers} auth=${pci_auth} + ${resp}= Post Request optf-osdf ${restUrl} data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + [Return] ${resp} + +Http Put + [Documentation] Wrapper for Http PUT + [Arguments] ${host} ${restUrl} ${auth} ${data} + ${pci_auth}= Create List ${auth['username']} ${auth['password']} + Create Session optf-osdf ${host} headers=${headers} auth=${pci_auth} + ${resp}= Put Request optf-osdf ${restUrl} data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + [Return] ${resp}
\ No newline at end of file diff --git a/tests/policy/suite1/global_properties.robot b/tests/policy/suite1/global_properties.robot index 60826bbc..e0c816ea 100644 --- a/tests/policy/suite1/global_properties.robot +++ b/tests/policy/suite1/global_properties.robot @@ -26,5 +26,5 @@ ${GLOBAL_POLICY_SERVER_URL} https://%{PDP_IP}:8081 ${GLOBAL_POLICY_AUTH} dGVzdHBkcDphbHBoYTEyMw== ${GLOBAL_POLICY_CLIENTAUTH} cHl0aG9uOnRlc3Q= ${GLOBAL_POLICY_HEALTHCHECK_URL} https://%{POLICY_IP}:6969 -${GLOBAL_POLICY_USERNAME} healthcheck -${GLOBAL_POLICY_PASSWORD} zb!XztG34 +${GLOBAL_POLICY_USERNAME} demo@people.osaaf.org +${GLOBAL_POLICY_PASSWORD} demo123456! diff --git a/tests/so/sanity-check/sanity_test_so.robot b/tests/so/sanity-check/sanity_test_so.robot index 7d6ddf31..dbf39cad 100644 --- a/tests/so/sanity-check/sanity_test_so.robot +++ b/tests/so/sanity-check/sanity_test_so.robot @@ -13,198 +13,198 @@ Create ServiceInstance for invalid input Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createService.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v3 data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Create ServiceInstance for invalid user Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createService.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI= Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v3 data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete ServiceInstance for invalid input Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteService.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete ServiceInstance for invalid user Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteService.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Activate ServiceInstance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}activateService.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/activate data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/activate data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Deactivate ServiceInstance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deactivateService.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/deactivate data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/deactivate data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Create Volume Group instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createVG.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/volumeGroups data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/volumeGroups data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete Volume Group instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteVG.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/volumeGroups/ff305d54-75b4-ff1b-cdb2-eb6b9e5460ff data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/volumeGroups/ff305d54-75b4-ff1b-cdb2-eb6b9e5460ff data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Create VF Module instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createVF.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Update VF Module instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}updateVF.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete VF Module instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteVF.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Replace VF Module instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}replaceVF.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff/replace data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff/replace data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Create Network instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createNetwork.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/networks data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/networks data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Update Network instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}updateNetwork.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Put Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/networks/2b125640-bd1a-4ef0-9ca0-ea76e2a22801 data=${data} headers=${headers} + ${resp}= Put Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/networks/2b125640-bd1a-4ef0-9ca0-ea76e2a22801 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete Network instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteNetwork.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/networks/2b125640-bd1a-4ef0-9ca0-ea76e2a22801 data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/networks/2b125640-bd1a-4ef0-9ca0-ea76e2a22801 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result SO ServiceInstance health check Create Session refrepo http://${REPO_IP}:8080 &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Get Request refrepo /ecomp/mso/infra/orchestrationRequests/v3/rq1234d1-5a33-55df-13ab-12abad84e333 headers=${headers} + ${resp}= Get Request refrepo /onap/so/infra/orchestrationRequests/v5/rq1234d1-5a33-55df-13ab-12abad84e333 headers=${headers} Should Not Contain ${resp.content} null Create VnfInstance for invalid input Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createVnf.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Update VnfInstance for invalid input Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}updateVnf.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Create VnfInstance for invalid credential Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createVnf.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI= Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete VnfInstance for invalid input Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteVnf.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Replace VnfInstance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}replaceVnf.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI= Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-c7cef19d94e/replace data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-c7cef19d94e/replace data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Get Orchestration Requests Create Session refrepo http://${REPO_IP}:8080 &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Get Request refrepo /ecomp/mso/infra/orchestrationRequests/v3 headers=${headers} + ${resp}= Get Request refrepo /onap/so/infra/orchestrationRequests/v5 headers=${headers} Should Not Contain ${resp.content} null Get Orchestration Requests Filter criteria Create Session refrepo http://${REPO_IP}:8080 &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Get Request refrepo /ecomp/mso/infra/orchestrationRequests/v3?filter=serviceInstanceId:EQUALS:bc305d54-75b4-431b-adb2-eb6b9e546014 headers=${headers} + ${resp}= Get Request refrepo /onap/so/infra/orchestrationRequests/v5?filter=serviceInstanceId:EQUALS:bc305d54-75b4-431b-adb2-eb6b9e546014 headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Create E2EService Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createE2eservice.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/e2eServiceInstances/v3 data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/e2eServiceInstances/v3 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Create E2EService with invalid credential Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createE2eservice.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI= Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/e2eServiceInstances/v3 data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/e2eServiceInstances/v3 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Create E2EService with invalid Input data Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createE2eserviceInvalid.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI= Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/e2eServiceInstances/v3 data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/e2eServiceInstances/v3 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete E2EService Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteE2eservice.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/e2eServiceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/e2eServiceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete E2EService with invalid credential Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteE2eservice.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI= Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/e2eServiceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/e2eServiceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete E2EService with invalid input data Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteE2eserviceInvalid.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/e2eServiceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/e2eServiceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result
\ No newline at end of file diff --git a/tests/usecases/5G-bulkpm/BulkpmE2E.robot b/tests/usecases/5G-bulkpm/BulkpmE2E.robot index 154b5139..fcc1cc76 100644 --- a/tests/usecases/5G-bulkpm/BulkpmE2E.robot +++ b/tests/usecases/5G-bulkpm/BulkpmE2E.robot @@ -18,6 +18,7 @@ ${TARGETURL_TOPICS} http://${DMAAP_MR_IP}:3904/topics ${TARGETURL_SUBSCR} http://${DMAAP_MR_IP}:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12?timeout=1000 ${CLI_EXEC_CLI} curl -k https://${DR_PROV_IP}:8443/internal/prov ${CLI_EXEC_CLI_DFC} docker exec dfc /bin/sh -c "ls /target | grep .gz" +${CLI_EXEC_CLI_FILECONSUMER} docker exec fileconsumer-node /bin/sh -c "ls /opt/app/subscriber/delivery | grep .gz" *** Test Cases *** @@ -27,12 +28,13 @@ Send VES File Ready Event to VES Collector ${evtdata}= Get Event Data From File ${EVENT_DATA_FILE} ${headers}= Create Header From String ${HEADER_STRING} ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} - Sleep 2s + Sleep 15s ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} - Sleep 2s + Sleep 5s ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} - Sleep 2s + Sleep 5s ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} + Sleep 5s Log Receive HTTP Status code ${resp.status_code} Should Be Equal As Strings ${resp.status_code} 202 @@ -51,19 +53,28 @@ Check VES Notification Topic is existing in Message Router List Should Contain Value ${topics} unauthenticated.VES_NOTIFICATION_OUTPUT Verify Downloaded PM file from xNF exist on Data File Collector - [Tags] Bulk_PM_E2E_03 - [Documentation] Check the PM XML file exists on the File Consumer Simulator - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz + [Tags] Bulk_PM_E2E_03 + [Documentation] Check the PM XML file exists on the data file collector + ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC} shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz Verify Default Feed And File Consumer Subscription On Datarouter - [Tags] Bulk_PM_E2E_04 - [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} https://dmaap-dr-prov/publish/1 - Should Contain ${cli_cmd_output.stdout} http://${DR_SUBSCIBER_IP}:7070
\ No newline at end of file + [Tags] Bulk_PM_E2E_04 + [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter + ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} https://dmaap-dr-prov/publish/1 + Should Contain ${cli_cmd_output.stdout} http://${DR_SUBSCIBER_IP}:7070 + + +Verify Fileconsumer Receive PM file from Data Router + [Tags] Bulk_PM_E2E_05 + [Documentation] Check PM XML file exists on the File Consumer Simulator + ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz |