Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,31 @@ Library String
Library Collections
Library PlatformLibrary managed_by_operator=%{RABBIT_IS_MANAGED_BY_OPERATOR}

*** Keywords ***
Get Image Tag
[Arguments] ${image}
${parts}= Split String ${image} :
${length}= Get Length ${parts}
Run Keyword If ${length} > 1 Return From Keyword ${parts[2]}
Run Keywords
... Log To Console \n[ERROR] Image ${parts} has no tag: ${image}\nMonitored images list: ${MONITORED_IMAGES}
... AND Fail Some images were not found, please check your .helpers template and description.yaml in the repository

*** Test Cases ***
Test Hardcoded Images
[Tags] all rabbitmq_images
${stripped_resources}= Strip String ${MONITORED_IMAGES} characters=, mode=right
@{list_resources} = Split String ${stripped_resources} ,
FOR ${resource} IN @{list_resources}
${type} ${name} ${container_name} ${image}= Split String ${resource}
${type} ${name} ${container_name} ${image}= Split String ${resource}
${resource_image}= Get Resource Image ${type} ${name} %{NAMESPACE} ${container_name}
Should Be Equal ${resource_image} ${image}
END

${expected_tag}= Get Image Tag ${image}
${actual_tag}= Get Image Tag ${resource_image}

Log To Console \n[COMPARE] ${resource}: Expected tag = ${expected_tag}, Actual tag = ${actual_tag}

Run Keyword And Continue On Failure Should Be Equal ${actual_tag} ${expected_tag}

END