mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-22 16:48:30 +01:00
[test-case] add switch scanner case
Signed-off-by: Yogi_Wang <yawang@vmware.com>
This commit is contained in:
parent
5cf72e3ba4
commit
8835813439
@ -91,3 +91,8 @@ Trivy Is Immutable Scanner
|
||||
Retry Double Keywords When Error Retry Element Click ${scanner_action_xpath} Retry Wait Until Page Contains Element ${delete_scanner_action_xpath}
|
||||
Retry Double Keywords When Error Retry Element Click ${delete_scanner_action_xpath} Retry Wait Until Page Contains Element ${delete_scanner_confirm_btn}
|
||||
Retry Double Keywords When Error Retry Element Click ${delete_scanner_confirm_btn} Retry Wait Until Page Contains Element ${immutable_trivy_msg_xpath}
|
||||
|
||||
Set Default Scanner
|
||||
[Arguments] ${scanner_name}
|
||||
Retry Element Click //clr-dg-row[contains(.,'${scanner_name}')]//clr-radio-wrapper/label
|
||||
Retry Double Keywords When Error Retry Element Click ${scanner_set_default} Retry Wait Until Page Contains Element ${scanner_set_default_success_xpath}
|
||||
|
@ -29,5 +29,7 @@ ${immutable_msg_xpath} //span[contains(.,'registration Clair is not allowed to
|
||||
${immutable_trivy_msg_xpath} //span[contains(.,'registration Trivy is not allowed to delete as it is immutable: scanner API: delete')]
|
||||
${delete_scanner_confirm_btn} xpath=//clr-modal//button[contains(.,'DELETE')]
|
||||
${scan_now_result} xpath=//div[@id="scan-result-container"]
|
||||
${scanner_set_default} xpath=//button[@id="set-default"]
|
||||
${scanner_set_default_success_xpath} //span[contains(.,'Successfully updated')]
|
||||
|
||||
|
||||
|
@ -53,34 +53,19 @@ Body Of Manage project publicity
|
||||
Close Browser
|
||||
|
||||
Body Of Scan A Tag In The Repo
|
||||
[Arguments] ${image_argument} ${tag_argument}
|
||||
Init Chrome Driver
|
||||
${d}= get current date result_format=%m%s
|
||||
|
||||
Sign In Harbor ${HARBOR_URL} user023 Test1@34
|
||||
Create An New Project project${d}
|
||||
Go Into Project project${d} has_image=${false}
|
||||
Push Image ${ip} user023 Test1@34 project${d} hello-world
|
||||
Push Image ${ip} user023 Test1@34 project${d} ${image_argument}:${tag_argument}
|
||||
Go Into Project project${d}
|
||||
Go Into Repo project${d}/hello-world
|
||||
Scan Repo latest Succeed
|
||||
Summary Chart Should Display latest
|
||||
Pull Image ${ip} user023 Test1@34 project${d} hello-world
|
||||
# Edit Repo Info
|
||||
Close Browser
|
||||
|
||||
Body Of Scan A Tag In The Repo Use Trivy
|
||||
Init Chrome Driver
|
||||
${d}= get current date result_format=%m%s
|
||||
|
||||
Sign In Harbor ${HARBOR_URL} user023 Test1@34
|
||||
Create An New Project project${d}
|
||||
Go Into Project project${d} has_image=${false}
|
||||
Push Image ${ip} user023 Test1@34 project${d} vmware/photon:1.0
|
||||
Go Into Project project${d}
|
||||
Go Into Repo project${d}/vmware/photon
|
||||
Scan Repo 1.0 Succeed
|
||||
Summary Chart Should Display 1.0
|
||||
Pull Image ${ip} user023 Test1@34 project${d} vmware/photon 1.0
|
||||
Go Into Repo project${d}/${image_argument}
|
||||
Scan Repo ${tag_argument} Succeed
|
||||
Summary Chart Should Display ${tag_argument}
|
||||
Pull Image ${ip} user023 Test1@34 project${d} ${image_argument} ${tag_argument}
|
||||
# Edit Repo Info
|
||||
Close Browser
|
||||
|
||||
|
@ -43,7 +43,7 @@ Test Case - Disable Scan Schedule
|
||||
Close Browser
|
||||
|
||||
Test Case - Scan A Tag In The Repo
|
||||
Body Of Scan A Tag In The Repo
|
||||
Body Of Scan A Tag In The Repo hello-world latest
|
||||
|
||||
Test Case - Scan As An Unprivileged User
|
||||
Init Chrome Driver
|
||||
|
@ -47,7 +47,7 @@ Test Case - Disable Scan Schedule
|
||||
Close Browser
|
||||
|
||||
Test Case - Scan A Tag In The Repo
|
||||
Body Of Scan A Tag In The Repo Use Trivy
|
||||
Body Of Scan A Tag In The Repo vmware/photon 1.0
|
||||
|
||||
Test Case - Scan As An Unprivileged User
|
||||
Init Chrome Driver
|
||||
@ -152,4 +152,36 @@ Test Case - Verfiy Project Level CVE Whitelist
|
||||
Body Of Verfiy Project Level CVE Whitelist goharbor/harbor-portal 2cb6a1c24dd6b88f11fd44ccc6560cb7be969f8ac5f752802c99cae6bcd592bb CVE-2019-19317\nCVE-2019-19646 \nCVE-2019-5188 \nCVE-2019-20387 \nCVE-2019-17498 \nCVE-2019-20372 \nCVE-2019-19244 \nCVE-2019-19603 \nCVE-2019-19880 \nCVE-2019-19923 \nCVE-2019-19925 \nCVE-2019-19926 \nCVE-2019-19959 \nCVE-2019-20218 \nCVE-2019-19232 \nCVE-2019-19234 \nCVE-2019-19645 CVE-2019-18276
|
||||
|
||||
Test Case - Verfiy Project Level CVE Whitelist By Quick Way of Add System
|
||||
Body Of Verfiy Project Level CVE Whitelist By Quick Way of Add System goharbor/harbor-portal 2cb6a1c24dd6b88f11fd44ccc6560cb7be969f8ac5f752802c99cae6bcd592bb CVE-2019-19317\nCVE-2019-19646 \nCVE-2019-5188 \nCVE-2019-20387 \nCVE-2019-17498 \nCVE-2019-20372 \nCVE-2019-19244 \nCVE-2019-19603 \nCVE-2019-19880 \nCVE-2019-19923 \nCVE-2019-19925 \nCVE-2019-19926 \nCVE-2019-19959 \nCVE-2019-20218 \nCVE-2019-19232 \nCVE-2019-19234 \nCVE-2019-19645 \nCVE-2019-18276
|
||||
Body Of Verfiy Project Level CVE Whitelist By Quick Way of Add System goharbor/harbor-portal 2cb6a1c24dd6b88f11fd44ccc6560cb7be969f8ac5f752802c99cae6bcd592bb CVE-2019-19317\nCVE-2019-19646 \nCVE-2019-5188 \nCVE-2019-20387 \nCVE-2019-17498 \nCVE-2019-20372 \nCVE-2019-19244 \nCVE-2019-19603 \nCVE-2019-19880 \nCVE-2019-19923 \nCVE-2019-19925 \nCVE-2019-19926 \nCVE-2019-19959 \nCVE-2019-20218 \nCVE-2019-19232 \nCVE-2019-19234 \nCVE-2019-19645 \nCVE-2019-18276
|
||||
|
||||
Test Case - Switch Scanner
|
||||
Init Chrome Driver
|
||||
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
||||
${d}= get current date result_format=%m%s
|
||||
|
||||
Switch To Scanners Page
|
||||
|
||||
Should Display The Default Trivy Scanner
|
||||
|
||||
Create An New Project project${d}
|
||||
Go Into Project project${d} has_image=${false}
|
||||
Push Image ${ip} admin Harbor12345 project${d} hello-world:latest
|
||||
Go Into Project project${d}
|
||||
Go Into Repo project${d}/hello-world
|
||||
Scan Repo latest Fail
|
||||
View Scan Error Log
|
||||
|
||||
Switch To Scanners Page
|
||||
|
||||
Set Default Scanner Clair
|
||||
Should Display The Default Clair Scanner
|
||||
|
||||
Go Into Project project${d}
|
||||
Go Into Repo project${d}/hello-world
|
||||
Scan Repo latest Succeed
|
||||
Move To Summary Chart
|
||||
Wait Until Page Contains No vulnerability
|
||||
|
||||
Switch To Scanners Page
|
||||
Set Default Scanner Trivy
|
||||
Close Browser
|
@ -27,7 +27,7 @@ Test Case - Manage project publicity
|
||||
Body Of Manage project publicity
|
||||
|
||||
Test Case - Scan A Tag In The Repo
|
||||
Body Of Scan A Tag In The Repo Use Trivy
|
||||
Body Of Scan A Tag In The Repo hello-world latest
|
||||
|
||||
Test Case - List Helm Charts
|
||||
Body Of List Helm Charts
|
||||
|
Loading…
Reference in New Issue
Block a user