mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-13 19:21:56 +01:00
Merge pull request #15978 from YangJiao0817/add-stop-scan-case
Add stop scan and stop scan all test cases
This commit is contained in:
commit
33fd4c06e1
@ -30,4 +30,17 @@ View Scan Error Log
|
|||||||
Retry Wait Until Page Contains View Log
|
Retry Wait Until Page Contains View Log
|
||||||
Retry Element Click xpath=${view_log_xpath}
|
Retry Element Click xpath=${view_log_xpath}
|
||||||
|
|
||||||
|
Scan Artifact
|
||||||
|
[Arguments] ${project} ${repo} ${label_xpath}=//clr-dg-row//label[1]
|
||||||
|
Go Into Project ${project}
|
||||||
|
Go Into Repo ${project}/${repo}
|
||||||
|
Retry Element Click ${label_xpath}
|
||||||
|
Retry Element Click ${scan_artifact_btn}
|
||||||
|
|
||||||
|
Stop Scan Artifact
|
||||||
|
Retry Element Click ${stop_scan_artifact_btn}
|
||||||
|
|
||||||
|
Check Scan Artifact Job Status Is Stopped
|
||||||
|
Wait Until Element Is Visible ${stopped_label}
|
||||||
|
${job_status}= Get Text ${stopped_label}
|
||||||
|
Should Be Equal As Strings '${job_status}' 'Scan stopped'
|
@ -22,5 +22,6 @@ ${view_log_xpath} //clr-dg-row//clr-dg-cell//a[contains(.,'View Log')]
|
|||||||
${build_history_btn} //button[contains(.,'Build History')]
|
${build_history_btn} //button[contains(.,'Build History')]
|
||||||
${build_history_data} //clr-dg-row
|
${build_history_data} //clr-dg-row
|
||||||
${push_image_command_btn} //hbr-push-image-button//button
|
${push_image_command_btn} //hbr-push-image-button//button
|
||||||
|
${scan_artifact_btn} //button[@id='scan-btn']
|
||||||
|
${stop_scan_artifact_btn} //button[@id='stop-scan']
|
||||||
|
${stopped_label} //span[@class='label stopped']
|
||||||
|
@ -107,3 +107,15 @@ Check Listed In CVE Allowlist
|
|||||||
|
|
||||||
Log All is_in_allow_list:${text}
|
Log All is_in_allow_list:${text}
|
||||||
Should Be Equal As Strings '${text}' '${is_in}'
|
Should Be Equal As Strings '${text}' '${is_in}'
|
||||||
|
|
||||||
|
Scan All Artifact
|
||||||
|
Switch To Vulnerability Page
|
||||||
|
Retry Element Click ${scan_now_button}
|
||||||
|
|
||||||
|
Stop Scan All Artifact
|
||||||
|
Retry Element Click ${stop_scan_button}
|
||||||
|
|
||||||
|
Check Scan All Artifact Job Status Is Stopped
|
||||||
|
Wait Until Element Is Visible ${stopped_icon}
|
||||||
|
${stopped_total}= Get Text ${stopped_icon}
|
||||||
|
Should Be True ${stopped_total} > 0
|
||||||
|
@ -22,6 +22,7 @@ ${vulnerability_dropdown_list_item_none} xpath=//select[@id='selectPolicy']//op
|
|||||||
${vulnerability_dropdown_list_item_custom} xpath=//select[@id='selectPolicy']//option[contains(.,'Custom')]
|
${vulnerability_dropdown_list_item_custom} xpath=//select[@id='selectPolicy']//option[contains(.,'Custom')]
|
||||||
${vulnerability_save_btn} xpath=//cron-selection//button[contains(.,'SAVE')]
|
${vulnerability_save_btn} xpath=//cron-selection//button[contains(.,'SAVE')]
|
||||||
${scan_now_button} //vulnerability-config//button[contains(.,'NOW')]
|
${scan_now_button} //vulnerability-config//button[contains(.,'NOW')]
|
||||||
|
${stop_scan_button} //vulnerability-config//button[contains(.,'Stop Scan')]
|
||||||
${vulnerability_page} //clr-vertical-nav-group-children/a[contains(.,'Vulnerability')]
|
${vulnerability_page} //clr-vertical-nav-group-children/a[contains(.,'Vulnerability')]
|
||||||
${set_default_scanner} //button[@id='set-default']
|
${set_default_scanner} //button[@id='set-default']
|
||||||
${scanner_action_xpath} //span[@id='action-scanner']
|
${scanner_action_xpath} //span[@id='action-scanner']
|
||||||
@ -32,5 +33,6 @@ ${scan_now_result} xpath=//div[@id="scan-result-container"]
|
|||||||
${scanner_set_default} xpath=//button[@id="set-default"]
|
${scanner_set_default} xpath=//button[@id="set-default"]
|
||||||
${scanner_set_default_success_xpath} //span[contains(.,'Successfully updated')]
|
${scanner_set_default_success_xpath} //span[contains(.,'Successfully updated')]
|
||||||
${not_scanned_icon} xpath=//span[@class[contains(.,'not-scan')]]
|
${not_scanned_icon} xpath=//span[@class[contains(.,'not-scan')]]
|
||||||
|
${stopped_icon} //span[@class[contains(.,'badge abort')]]
|
||||||
|
|
||||||
|
|
||||||
|
@ -460,6 +460,24 @@ Check Harbor Api Page
|
|||||||
Should Be Equal ${Title} Harbor Swagger
|
Should Be Equal ${Title} Harbor Swagger
|
||||||
Retry Wait Element xpath=//h2[contains(.,"Harbor API")]
|
Retry Wait Element xpath=//h2[contains(.,"Harbor API")]
|
||||||
|
|
||||||
|
Body Of Stop Scan And Stop Scan All
|
||||||
|
Init Chrome Driver
|
||||||
|
${d}= get current date result_format=%m%s
|
||||||
|
${repo}= Set Variable goharbor/harbor-e2e-engine
|
||||||
|
${tag}= Set Variable test-ui
|
||||||
|
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
||||||
|
Create An New Project And Go Into Project project${d}
|
||||||
|
Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${repo} ${tag} ${tag}
|
||||||
|
# stop scan
|
||||||
|
Scan Artifact project${d} ${repo}
|
||||||
|
Stop Scan Artifact
|
||||||
|
Check Scan Artifact Job Status Is Stopped
|
||||||
|
# stop scan all
|
||||||
|
Scan All Artifact
|
||||||
|
Stop Scan All Artifact
|
||||||
|
Check Scan All Artifact Job Status Is Stopped
|
||||||
|
Close Browser
|
||||||
|
|
||||||
Prepare Image Package Test Files
|
Prepare Image Package Test Files
|
||||||
[Arguments] ${files_path}
|
[Arguments] ${files_path}
|
||||||
${rc} ${output}= Run And Return Rc And Output bash tests/robot-cases/Group0-Util/prepare_imgpkg_test_files.sh ${files_path}
|
${rc} ${output}= Run And Return Rc And Output bash tests/robot-cases/Group0-Util/prepare_imgpkg_test_files.sh ${files_path}
|
||||||
|
@ -118,3 +118,7 @@ Test Case - Verfiy Project Level CVE Allowlist
|
|||||||
|
|
||||||
Test Case - Verfiy Project Level CVE Allowlist By Quick Way of Add System
|
Test Case - Verfiy Project Level CVE Allowlist By Quick Way of Add System
|
||||||
Body Of Verfiy Project Level CVE Allowlist 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 Allowlist 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 - Stop Scan And Stop Scan All
|
||||||
|
[Tags] stop_scan_job
|
||||||
|
Body Of Stop Scan And Stop Scan All
|
||||||
|
Loading…
Reference in New Issue
Block a user