Loading services/run_capif_tests.sh +2 −2 Original line number Diff line number Diff line #!/bin/bash DOCKER_ROBOT_IMAGE=dockerhub.hi.inet/5ghacking/5gnow-robot-test-image DOCKER_ROBOT_IMAGE_VERSION=4.0 DOCKER_ROBOT_IMAGE=labs.etsi.org:5050/ocf/robot-tests-image DOCKER_ROBOT_IMAGE_VERSION=1.0 cd .. REPOSITORY_BASE_FOLDER=${PWD} TEST_FOLDER=$REPOSITORY_BASE_FOLDER/tests Loading tests/libraries/interrupt_listener.py +4 −1 Original line number Diff line number Diff line Loading @@ -22,3 +22,6 @@ class InterruptListener: def end_suite(self, name, attrs): print(f"Ending suite: {name}") INTERRUPT_LISTENER=InterruptListener() No newline at end of file tests/resources/common/basicRequests.robot +18 −17 Original line number Diff line number Diff line Loading @@ -437,6 +437,7 @@ Delete User At Register [Documentation] (Administrator) This Keyword delete a user from register. [Arguments] ${username}=${NONE} ${uuid}=${NONE} ${user_uuid}= Set Variable ${uuid} ${environment_users}= Set Variable ${TRUE} IF "${username}" != "${NONE}" ${user_uuid}= Call Method ${CAPIF_USERS} get_user_uuid ${username} Loading @@ -444,13 +445,16 @@ Delete User At Register IF "${user_uuid}" == "${NONE}" ${user_uuid}= Get User Uuid At Register ${username} ${environment_users}= Set Variable ${FALSE} END ${resp}= Delete User Admin Register Request ${user_uuid} Should Be Equal As Strings ${resp.status_code} 204 q IF ${environment_users} Call Method ${CAPIF_USERS} remove_register_users_entry ${user_uuid} END RETURN ${resp} Loading @@ -458,7 +462,7 @@ Get List of Users At Register [Documentation] (Administrator) This Keyword retrieve a list of users from register. ${headers}= Create Register Admin Session ${CAPIF_HTTPS_REGISTER_URL} verify=False ${resp}= DELETE On Session register_session /getUsers headers=${headers} ${resp}= GET On Session register_session /getUsers headers=${headers} Should Be Equal As Strings ${resp.status_code} 200 Loading @@ -470,13 +474,16 @@ Get User Uuid At Register ${users}= Get List of Users At Register # Find the first user with username indicated ${user}= Evaluate [item for item in ${users} if item['username'] == ${username}][0] modules=collections ${user_uuid}= Set Variable &{EMPTY} FOR ${user} IN @{users} IF "${user['username']}" == "${username}" ${user_uuid}= Set Variable ${user['uuid']} BREAK END END ${user_uuid}= Set Variable IF ${user} == &{EMPTY} IF "${user_uuid}" == "${EMPTY}" Log ${username} not found in Register ELSE ${user_uuid}= Set Variable ${user['uuid']} END RETURN ${user_uuid} Loading Loading @@ -558,15 +565,9 @@ Remove Resource ... verify=ca.crt ... username=${management_cert} Status Should Be 204 ${resp} &{body}= Create Dictionary ... password=password ... username=${username} Create Session jwtsession ${CAPIF_HTTPS_REGISTER_URL} verify=False disable_warnings=1 Run Keyword and Continue On Failure Status Should Be 204 ${resp} ${resp}= DELETE On Session jwtsession /remove json=${body} Delete User At Register username=${username} Should Be Equal As Strings ${resp.status_code} 204 Loading tests/tasks/Dummy Info/populate.robot +1 −3 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ Library ArchiveLibrary Library OperatingSystem Library DateTime Suite Teardown Reset Testing Environment Test Setup Reset Testing Environment Loading Loading @@ -99,14 +98,13 @@ Remove Dummy Invokers and Providers Log ${username}=${entities_dictionary}[${username}] ${resource_url}= Set Variable ${entities_dictionary}[${username}][resource_url] ${management_cert}= Set Variable ${entities_dictionary}[${username}][management_cert] Run Keyword And Ignore Error Remove Resource ${resource_url.path} ${management_cert} ${username} Run Keyword And Continue On Failure Remove Resource ${resource_url.path} ${management_cert} ${username} END ${result}= Run Process ls -l Log Many ${result.stdout} *** Keywords *** Get Provider [Arguments] ${index} ${entities_dictionary} Loading tests/tasks/Users Management/users.robot +1 −2 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ Library OperatingSystem Library DateTime Library String Suite Teardown Reset Testing Environment *** Variables *** Loading @@ -19,7 +18,7 @@ ${TOTAL_USERS} 5 ${BACKUP_DIRECTORY} backup ${RESULT_FOLDER} /opt/robot-tests/results ${OUTPUT_ZIP_FILE} entities_loaded.zip ${OUTPUT_ZIP_FILE} users_loaded.zip ${USER_PASSWORD} password ${USERNAME_PREFIX} user Loading Loading
services/run_capif_tests.sh +2 −2 Original line number Diff line number Diff line #!/bin/bash DOCKER_ROBOT_IMAGE=dockerhub.hi.inet/5ghacking/5gnow-robot-test-image DOCKER_ROBOT_IMAGE_VERSION=4.0 DOCKER_ROBOT_IMAGE=labs.etsi.org:5050/ocf/robot-tests-image DOCKER_ROBOT_IMAGE_VERSION=1.0 cd .. REPOSITORY_BASE_FOLDER=${PWD} TEST_FOLDER=$REPOSITORY_BASE_FOLDER/tests Loading
tests/libraries/interrupt_listener.py +4 −1 Original line number Diff line number Diff line Loading @@ -22,3 +22,6 @@ class InterruptListener: def end_suite(self, name, attrs): print(f"Ending suite: {name}") INTERRUPT_LISTENER=InterruptListener() No newline at end of file
tests/resources/common/basicRequests.robot +18 −17 Original line number Diff line number Diff line Loading @@ -437,6 +437,7 @@ Delete User At Register [Documentation] (Administrator) This Keyword delete a user from register. [Arguments] ${username}=${NONE} ${uuid}=${NONE} ${user_uuid}= Set Variable ${uuid} ${environment_users}= Set Variable ${TRUE} IF "${username}" != "${NONE}" ${user_uuid}= Call Method ${CAPIF_USERS} get_user_uuid ${username} Loading @@ -444,13 +445,16 @@ Delete User At Register IF "${user_uuid}" == "${NONE}" ${user_uuid}= Get User Uuid At Register ${username} ${environment_users}= Set Variable ${FALSE} END ${resp}= Delete User Admin Register Request ${user_uuid} Should Be Equal As Strings ${resp.status_code} 204 q IF ${environment_users} Call Method ${CAPIF_USERS} remove_register_users_entry ${user_uuid} END RETURN ${resp} Loading @@ -458,7 +462,7 @@ Get List of Users At Register [Documentation] (Administrator) This Keyword retrieve a list of users from register. ${headers}= Create Register Admin Session ${CAPIF_HTTPS_REGISTER_URL} verify=False ${resp}= DELETE On Session register_session /getUsers headers=${headers} ${resp}= GET On Session register_session /getUsers headers=${headers} Should Be Equal As Strings ${resp.status_code} 200 Loading @@ -470,13 +474,16 @@ Get User Uuid At Register ${users}= Get List of Users At Register # Find the first user with username indicated ${user}= Evaluate [item for item in ${users} if item['username'] == ${username}][0] modules=collections ${user_uuid}= Set Variable &{EMPTY} FOR ${user} IN @{users} IF "${user['username']}" == "${username}" ${user_uuid}= Set Variable ${user['uuid']} BREAK END END ${user_uuid}= Set Variable IF ${user} == &{EMPTY} IF "${user_uuid}" == "${EMPTY}" Log ${username} not found in Register ELSE ${user_uuid}= Set Variable ${user['uuid']} END RETURN ${user_uuid} Loading Loading @@ -558,15 +565,9 @@ Remove Resource ... verify=ca.crt ... username=${management_cert} Status Should Be 204 ${resp} &{body}= Create Dictionary ... password=password ... username=${username} Create Session jwtsession ${CAPIF_HTTPS_REGISTER_URL} verify=False disable_warnings=1 Run Keyword and Continue On Failure Status Should Be 204 ${resp} ${resp}= DELETE On Session jwtsession /remove json=${body} Delete User At Register username=${username} Should Be Equal As Strings ${resp.status_code} 204 Loading
tests/tasks/Dummy Info/populate.robot +1 −3 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ Library ArchiveLibrary Library OperatingSystem Library DateTime Suite Teardown Reset Testing Environment Test Setup Reset Testing Environment Loading Loading @@ -99,14 +98,13 @@ Remove Dummy Invokers and Providers Log ${username}=${entities_dictionary}[${username}] ${resource_url}= Set Variable ${entities_dictionary}[${username}][resource_url] ${management_cert}= Set Variable ${entities_dictionary}[${username}][management_cert] Run Keyword And Ignore Error Remove Resource ${resource_url.path} ${management_cert} ${username} Run Keyword And Continue On Failure Remove Resource ${resource_url.path} ${management_cert} ${username} END ${result}= Run Process ls -l Log Many ${result.stdout} *** Keywords *** Get Provider [Arguments] ${index} ${entities_dictionary} Loading
tests/tasks/Users Management/users.robot +1 −2 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ Library OperatingSystem Library DateTime Library String Suite Teardown Reset Testing Environment *** Variables *** Loading @@ -19,7 +18,7 @@ ${TOTAL_USERS} 5 ${BACKUP_DIRECTORY} backup ${RESULT_FOLDER} /opt/robot-tests/results ${OUTPUT_ZIP_FILE} entities_loaded.zip ${OUTPUT_ZIP_FILE} users_loaded.zip ${USER_PASSWORD} password ${USERNAME_PREFIX} user Loading