Skip to content
Snippets Groups Projects
Commit 540ff21a authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Add new functionality to recover uuid from register service if username is not on environment

parent afb12523
No related branches found
No related tags found
2 merge requests!99Merge Latest changes from staging to main,!55Resolve "Robot task to create default users by admin"
Pipeline #7368 failed
......@@ -29,5 +29,6 @@ class CapifUserManager():
for uuid, stored_user in self.register_users.items():
if stored_user == username:
return uuid
return None
CAPIF_USERS = CapifUserManager()
\ No newline at end of file
......@@ -6,6 +6,7 @@ Library Collections
Library OperatingSystem
Library XML
Library Telnet
Library String
*** Variables ***
......@@ -441,6 +442,10 @@ Delete User At Register
${user_uuid}= Call Method ${CAPIF_USERS} get_user_uuid ${username}
END
IF "${user_uuid}" == "${NONE}"
${user_uuid}= Get User Uuid At Register ${username}
END
${resp}= Delete User Admin Register Request ${user_uuid}
Should Be Equal As Strings ${resp.status_code} 204
......
......@@ -21,8 +21,8 @@ ${BACKUP_DIRECTORY} backup
${RESULT_FOLDER} /opt/robot-tests/results
${OUTPUT_ZIP_FILE} entities_loaded.zip
${USER_PASSWORD} umapassword
${USERNAME_PREFIX} uma
${USER_PASSWORD} password
${USERNAME_PREFIX} user
${DESCRIPTION} Testing purpouse
......@@ -82,16 +82,10 @@ Remove Client Users
FOR ${username} IN @{entities_dictionary}
Log ${username}=${entities_dictionary}[${username}]
Run Keyword And Continue On Failure ${username}
Run Keyword And Continue On Failure Delete User At Register username=${username}
END
${result}= Run Process ls -l
Log Many ${result.stdout}
*** Keywords ***
Delete User
[Arguments] ${username}
${user_uuid}= Get User Uuid At Register ${username}
Delete User Admin Register Request ${user_uuid}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment