Add nightly test case of 'Retag should be forbidden when system configuration read-only mode was set'.

Signed-off-by: danfengliu <danfengl@vmware.com>
This commit is contained in:
danfengliu 2019-10-10 10:36:19 +08:00 committed by Danfeng Liu (c)
parent 0a85acac9a
commit ac0d3c991a
2 changed files with 51 additions and 20 deletions

View File

@ -95,6 +95,11 @@ Retry Wait Element Not Visible
@{param} Create List ${element_xpath}
Retry Action Keyword Wait Until Element Is Not Visible @{param}
Retry Wait Element Should Be Disabled
[Arguments] ${element_xpath}
@{param} Create List ${element_xpath}
Retry Action Keyword Element Should Be Disabled @{param}
Retry Element Click
[Arguments] ${element_xpath}
@{param} Create List ${element_xpath}
@ -159,9 +164,11 @@ Retry List Selection Should Be
[Arguments] ${element} ${text}
@{param} Create List ${element} ${text}
Retry Action Keyword Wait And List Selection Should Be @{param}
Link Click
[Arguments] ${element_xpath}
Click Link ${element_xpath}
Wait And List Selection Should Be
[Arguments] ${element} ${text}
Wait Until Element Is Visible And Enabled ${element}

View File

@ -561,3 +561,27 @@ Test Case - Project Quotas Control Under GC
@{param} Create List project${d}
Retry Keyword When Return Value Mismatch Get Project Storage Quota Text From Project Quotas List 0Byte of ${storage_quota}${storage_quota_unit} 60 @{param}
Close Browser
Test Case - Can Not Retag Image In ReadOnly Mode
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} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Create An New Project project${random_num1}
Create An New Project project${random_num2}
Go Into Project project${random_num1} has_image=${false}
Sleep 1
Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${random_num1} redis ${image_tag}
Sleep 1
Enable Read Only
Go Into Repo project${random_num1}/redis
Retag Image ${image_tag} project${random_num2} ${target_image_name} ${target_tag_value}
Retry Wait Element Not Visible ${repo_retag_confirm_dlg}
Navigate To Projects
Go Into Project project${random_num2} has_image=${false}
Sleep 10
Go Into Project project${random_num2} has_image=${false}
Disable Read Only
Close Browser