Merge pull request #16257 from YangJiao0817/add-copy-cosign-accessory-testcase

Add copy accessory test case
This commit is contained in:
Yang Jiao 2022-01-24 10:57:39 +08:00 committed by GitHub
commit 7100e893f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 0 deletions

View File

@ -220,6 +220,10 @@ Docker Login
[Arguments] ${server} ${username} ${password} [Arguments] ${server} ${username} ${password}
Wait Unitl Command Success docker login -u ${username} -p ${password} ${server} Wait Unitl Command Success docker login -u ${username} -p ${password} ${server}
Docker Logout
[Arguments] ${server}
Wait Unitl Command Success docker logout ${server}
Docker Pull Docker Pull
[Arguments] ${image} [Arguments] ${image}
${output}= Retry Keyword N Times When Error 6 Wait Unitl Command Success docker pull ${image} ${output}= Retry Keyword N Times When Error 6 Wait Unitl Command Success docker pull ${image}

View File

@ -518,6 +518,36 @@ Test Case - Copy A Image
Retry Wait Until Page Contains Element xpath=${tag_value_xpath} Retry Wait Until Page Contains Element xpath=${tag_value_xpath}
Close Browser Close Browser
Test Case - Copy A Image And Accessory
[Tags] copy_image_and_accessory
Init Chrome Driver
${d}= Get Current Date result_format=%m%s
${source_project}= Set Variable source_project${d}
${target_project}= Set Variable target_project${d}
${user}= Set Variable user006
${pwd}= Set Variable Test1@34
${image}= Set Variable redis
${tag}= Set Variable latest
Sign In Harbor ${HARBOR_URL} ${user} ${pwd}
Create An New Project And Go Into Project ${target_project}
Create An New Project And Go Into Project ${source_project}
Push Image With Tag ${ip} ${user} ${pwd} ${source_project} ${image} ${tag}
Cosign Generate Key Pair
Docker Login ${ip} ${user} ${pwd}
Cosign Sign ${ip}/${source_project}/${image}:${tag}
Docker Logout ${ip}
Retry Double Keywords When Error Go Into Repo ${source_project}/${image} Should Be Signed By Cosign ${tag}
Copy Image ${tag} ${target_project} ${image}
Retry Wait Until Page Contains Copy artifact successfully
Retry Double Keywords When Error Go Into Project ${target_project} Retry Wait Until Page Contains ${image}
Retry Double Keywords When Error Go Into Repo ${target_project}/${image} Retry Wait Until Page Contains Element //clr-dg-row[contains(.,${tag})]
Should Be Signed By Cosign ${tag}
Close Browser
Test Case - Create An New Project With Quotas Set Test Case - Create An New Project With Quotas Set
Init Chrome Driver Init Chrome Driver
${d}= Get Current Date result_format=%m%s ${d}= Get Current Date result_format=%m%s