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
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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
+5 −0
Original line number Diff line number Diff line
@@ -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
+3 −9
Original line number Diff line number Diff line
@@ -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}