mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-30 14:13:43 +01:00
Merge pull request #11591 from AllForNothing/nightly-untag
Add new nightly case for GC untagged images
This commit is contained in:
commit
ad60bdddf8
@ -1041,7 +1041,7 @@
|
||||
"TAGGED": "Tagged",
|
||||
"UNTAGGED": "Untagged",
|
||||
"ALL": "All",
|
||||
"PLACEHOLDER": "We couldn't find any artifactds!",
|
||||
"PLACEHOLDER": "We couldn't find any artifacts!",
|
||||
"SCAN_UNSUPPORTED": "Unsupported"
|
||||
},
|
||||
"TAG": {
|
||||
|
@ -304,6 +304,12 @@ Click GC Now
|
||||
Retry Element Click xpath=${gc_now_xpath}
|
||||
Sleep 2
|
||||
|
||||
Click GC Now With Param Delete Untagged Artifacts
|
||||
Sleep 1
|
||||
Retry Element Click xpath=${checkbox_delete_untagged_artifacts}
|
||||
Retry Element Click xpath=${gc_now_xpath}
|
||||
Sleep 5
|
||||
|
||||
View GC Details
|
||||
Retry Element Click xpath=${gc_log_details_xpath}
|
||||
Sleep 2
|
||||
|
@ -37,3 +37,4 @@ ${configuration_system_wl_textarea} //*[@id='whitelist-textarea']
|
||||
${configuration_system_wl_add_confirm_btn} //*[@id='add-to-system']
|
||||
${configuration_system_wl_delete_a_cve_id_icon} //system-settings/form/section//ul/li[1]/clr-icon
|
||||
${configuration_sys_repo_readonly_chb_id} //*[@id='repo_read_only_lbl']
|
||||
${checkbox_delete_untagged_artifacts} //gc-config//clr-checkbox-wrapper//label[contains(@for,'delete_untagged')]
|
@ -42,3 +42,9 @@ Delete A Tag
|
||||
Retry Element Click ${delete_tag_button}
|
||||
Retry Wait Until Page Contains Element ${dialog_delete_button}
|
||||
Retry Element Click ${dialog_delete_button}
|
||||
|
||||
Should Contain Artifact
|
||||
Retry Wait Until Page Contains Element xpath=//artifact-list-tab//clr-dg-row//a[contains(.,'sha256')]
|
||||
|
||||
Should Not Contain Any Artifact
|
||||
Retry Wait Until Page Not Contains Element xpath=//artifact-list-tab//clr-dg-row
|
@ -556,6 +556,38 @@ Test Case - Tag CRUD
|
||||
Should Contain Tag 456
|
||||
Delete A Tag latest
|
||||
Should Not Contain Tag latest
|
||||
Close Browser
|
||||
|
||||
Test Case - GC Untagged Images
|
||||
Init Chrome Driver
|
||||
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
||||
${d}= Get Current Date result_format=%m%s
|
||||
Create An New Project project${d}
|
||||
Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} hello-world latest
|
||||
# make hello-world untagged
|
||||
Go Into Project project${d}
|
||||
Go Into Repo hello-world
|
||||
Go Into Artifact latest
|
||||
Should Contain Tag latest
|
||||
Delete A Tag latest
|
||||
Should Not Contain Tag latest
|
||||
# run gc without param delete untagged artifacts checked, should not delete hello-world:latest
|
||||
Switch To Garbage Collection
|
||||
Click GC Now
|
||||
Go Into Project project${d}
|
||||
Switch To Project Repo
|
||||
Go Into Repo hello-world
|
||||
Should Contain Artifact
|
||||
# run gc with param delete untagged artifacts checked, should delete hello-world
|
||||
Switch To Garbage Collection
|
||||
Click GC Now With Param Delete Untagged Artifacts
|
||||
Go Into Project project${d}
|
||||
Switch To Project Repo
|
||||
Go Into Repo hello-world
|
||||
Should Not Contain Any Artifact
|
||||
Close Browser
|
||||
|
||||
|
||||
|
||||
Test Case - Tag Retention
|
||||
Init Chrome Driver
|
||||
|
Loading…
Reference in New Issue
Block a user