mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 18:25:56 +01:00
Add E2E test for retag
Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
This commit is contained in:
parent
38c4f12f2e
commit
34dee765ec
16
tests/resources/Harbor-Pages/Project-Retag.robot
Normal file
16
tests/resources/Harbor-Pages/Project-Retag.robot
Normal file
@ -0,0 +1,16 @@
|
||||
Documentation This resource provides any keywords related to the Harbor private registry appliance
|
||||
Resource ../../resources/Util.robot
|
||||
|
||||
*** Keywords ***
|
||||
|
||||
Retag Image
|
||||
[Arguments] ${tag} ${projectname} ${reponame} ${tagname}
|
||||
Click Element xpath=//clr-dg-row[contains(.,"${tag}")]//label
|
||||
Sleep 1
|
||||
Click Element xpath=${retag_btn}
|
||||
Sleep 1
|
||||
#input necessary info
|
||||
Input Text xpath=${project-name_xpath} ${projectname}
|
||||
Input Text xpath=${repo-name_xpath} ${reponame}
|
||||
Input Text xpath=${tag-name_xpath} ${tagname}
|
||||
Click Element xpath=${confirm_btn}
|
14
tests/resources/Harbor-Pages/Project-Retag_Elements.robot
Normal file
14
tests/resources/Harbor-Pages/Project-Retag_Elements.robot
Normal file
@ -0,0 +1,14 @@
|
||||
*** Settings ***
|
||||
Documentation This resource provides any keywords related to the Harbor private registry appliance
|
||||
|
||||
*** Variables ***
|
||||
|
||||
${retag_btn} //clr-dg-action-bar//button[contains(.,'Retag')]
|
||||
${project-name_xpath} //*[@id='project-name']
|
||||
${repo-name_xpath} //*[@id='repo-name']
|
||||
${tag-name_xpath} //*[@id='tag-name']
|
||||
${confirm_btn} //button[contains(.,'CONFIRM')]
|
||||
${target_image_name} target-alpine
|
||||
${target_tag_value} 3.2.10-target
|
||||
${tag_value_xpath} //clr-dg-row[contains(.,'${target_tag_value}')]
|
||||
${image_tag} 3.2.10-alpine
|
@ -39,6 +39,8 @@ Resource Harbor-Pages/Project-Repository_Elements.robot
|
||||
Resource Harbor-Pages/Project-Config.robot
|
||||
Resource Harbor-Pages/Project-Helmcharts.robot
|
||||
Resource Harbor-Pages/Project-Helmcharts_Elements.robot
|
||||
Resource Harbor-Pages/Project-Retag.robot
|
||||
Resource Harbor-Pages/Project-Retag_Elements.robot
|
||||
Resource Harbor-Pages/Replication.robot
|
||||
Resource Harbor-Pages/Replication_Elements.robot
|
||||
Resource Harbor-Pages/UserProfile.robot
|
||||
|
@ -695,4 +695,29 @@ Test Case - Scan Image On Push
|
||||
Go Into Project library
|
||||
Go Into Repo memcached
|
||||
Summary Chart Should Display latest
|
||||
Close Browser
|
||||
Close Browser
|
||||
|
||||
Test Case - Retag A Image Tag
|
||||
Init Chrome Driver
|
||||
${random_num1}= Get Current Date result_format=%m%s
|
||||
${random_num2}= Evaluate str(random.randint(1000,9999)) modules=random
|
||||
|
||||
Sign In Harbor ${HARBOR_URL} user028 Test1@34
|
||||
Create An New Project project${random_num1}
|
||||
Create An New Project project${random_num2}
|
||||
|
||||
Go Into Project project${random_num1}
|
||||
Sleep 1
|
||||
Push Image With Tag ${ip} user028 Test1@34 project${random_num1} redis ${image_tag}
|
||||
Sleep 1
|
||||
Go Into Repo project${random_num1}/redis
|
||||
Retag Image ${image_tag} project${random_num2} ${target_image_name} ${target_tag_value}
|
||||
|
||||
Back To projects
|
||||
Go Into Project project${random_num2}
|
||||
Sleep 1
|
||||
Page Should Contain ${target_image_name}
|
||||
Go Into Repo project${random_num2}/${target_image_name}
|
||||
Sleep 1
|
||||
Page Should Contain Element xpath=${tag_value_xpath}
|
||||
Close Browser
|
||||
|
Loading…
Reference in New Issue
Block a user