From bb64f734d36a48007b012bbf7f3a5c68f18d23de Mon Sep 17 00:00:00 2001 From: Yang Jiao <72076317+YangJiao0817@users.noreply.github.com> Date: Tue, 14 Mar 2023 17:09:30 +0800 Subject: [PATCH] [Cherry-pick]Add Job Service Dashboard Job Queues testcase (#18348) Add Job Service Dashboard Job Queues testcase Fix #17949 Signed-off-by: Yang Jiao --- tests/resources/Harbor-Pages/GC.robot | 8 +- .../resources/Harbor-Pages/GC_Elements.robot | 4 +- .../Harbor-Pages/Job_Service_Dashboard.robot | 120 ++++++++++++++++++ .../Job_Service_Dashboard_Elements.robot | 23 ++++ .../resources/Harbor-Pages/Log_Rotation.robot | 8 +- .../Harbor-Pages/Project-Tag-Retention.robot | 19 +-- .../Project-Tag-Retention_Elements.robot | 1 + .../resources/Harbor-Pages/Replication.robot | 2 +- .../Harbor-Pages/Vulnerability.robot | 3 +- tests/resources/Util.robot | 4 +- tests/robot-cases/Group1-Nightly/Common.robot | 78 +++++++++++- 11 files changed, 247 insertions(+), 23 deletions(-) create mode 100644 tests/resources/Harbor-Pages/Job_Service_Dashboard.robot create mode 100644 tests/resources/Harbor-Pages/Job_Service_Dashboard_Elements.robot diff --git a/tests/resources/Harbor-Pages/GC.robot b/tests/resources/Harbor-Pages/GC.robot index 1bd420c65..c74879363 100644 --- a/tests/resources/Harbor-Pages/GC.robot +++ b/tests/resources/Harbor-Pages/GC.robot @@ -23,10 +23,13 @@ Switch To Garbage Collection Retry Double Keywords When Error Retry Element Click xpath=${gc_page_xpath} Retry Wait Until Page Contains Element ${gc_now_button} GC Now - [Arguments] ${untag}=${false} + [Arguments] ${untag}=${false} ${dry_run}=${false} Switch To Garbage Collection Run Keyword If '${untag}' == '${true}' Retry Element Click xpath=${checkbox_delete_untagged_artifacts} - Retry Double Keywords When Error Retry Element Click ${gc_now_button} Retry Wait Until Page Contains Running + ${button}= Run Keyword If ${dry_run}==${false} Set Variable ${gc_now_button} ELSE Set Variable ${dry_run_button} + Retry Double Keywords When Error Retry Element Click ${button} Retry Wait Until Page Contains Running + ${execution_id}= Get Text ${gc_latest_execution_id} + [Return] ${execution_id} Retry GC Should Be Successful [Arguments] ${history_id} ${expected_msg} @@ -55,4 +58,3 @@ Set GC Schedule Run Keyword If '${type}'=='custom' Run Keywords Retry Element Click ${vulnerability_dropdown_list_item_custom} AND Retry Text Input ${targetCron_id} ${value} ... ELSE Retry Element Click ${vulnerability_dropdown_list_item_none} Retry Double Keywords When Error Retry Element Click ${GC_schedule_save_btn} Retry Wait Until Page Not Contains Element ${gc_schedule_save_btn} - Capture Page Screenshot \ No newline at end of file diff --git a/tests/resources/Harbor-Pages/GC_Elements.robot b/tests/resources/Harbor-Pages/GC_Elements.robot index c8f72835f..b3b454d6f 100644 --- a/tests/resources/Harbor-Pages/GC_Elements.robot +++ b/tests/resources/Harbor-Pages/GC_Elements.robot @@ -18,8 +18,10 @@ Documentation This resource provides any keywords related to the Harbor private *** Variables *** ${gc_page_xpath} //clr-main-container//clr-vertical-nav-group//span[contains(.,'Clean Up')] ${gc_now_button} //*[@id='gc-now'] +${dry_run_button} //*[@id='gc-dry-run'] ${checkbox_delete_untagged_artifacts} //gc-config//clr-toggle-wrapper/label[contains(@for,'delete_untagged')] ${latest_job_id_xpath} //clr-datagrid//div//clr-dg-row[1]//clr-dg-cell[1] ${gc_schedule_edit_btn} //*[@id='editSchedule'] ${gc_schedule_select} //*[@id='selectPolicy'] -${gc_schedule_save_btn} //*[@id='config-save'] \ No newline at end of file +${gc_schedule_save_btn} //*[@id='config-save'] +${gc_latest_execution_id} //clr-dg-row[1]//clr-dg-cell[1] diff --git a/tests/resources/Harbor-Pages/Job_Service_Dashboard.robot b/tests/resources/Harbor-Pages/Job_Service_Dashboard.robot new file mode 100644 index 000000000..926dd9203 --- /dev/null +++ b/tests/resources/Harbor-Pages/Job_Service_Dashboard.robot @@ -0,0 +1,120 @@ +# Copyright Project Harbor Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License + +*** Settings *** +Documentation This resource provides any keywords related to the Harbor private registry appliance + +*** Keywords *** +Switch To Job Queues + Retry Element Click //clr-main-container//clr-vertical-nav-group//span[contains(.,'Job Service Dashboard')] + Retry Wait Until Page Contains Element //h2//span[contains(.,'Job Service Dashboard')] + +Select Jobs + [Arguments] @{job_types} + FOR ${job_type} IN @{job_types} + Retry Element Click //clr-datagrid//clr-dg-row[contains(.,'${job_type}')]//label + END + +Stop Pending Jobs + [Arguments] @{job_types} + Select Jobs @{job_types} + Retry Double Keywords When Error Retry Button Click ${job_service_stop_btn} Retry Button Click ${confirm_btn} + Retry Wait Until Page Contains Stopped jobs successfully + +Stop All Pending Jobs + Retry Double Keywords When Error Retry Button Click ${job_service_stop_all_btn} Retry Button Click ${confirm_btn} + Retry Wait Until Page Contains Stopped all the job queues successfully + +Pause Jobs + [Arguments] @{job_types} + Select Jobs @{job_types} + Retry Double Keywords When Error Retry Button Click ${job_service_pause_btn} Retry Button Click ${confirm_btn} + Retry Wait Until Page Contains Paused jobs successfully + Check Jobs Paused Yes @{job_types} + +Resume Jobs + [Arguments] @{job_types} + Select Jobs @{job_types} + Retry Double Keywords When Error Retry Button Click ${job_service_resume_btn} Retry Button Click ${confirm_btn} + Retry Wait Until Page Contains Resumed jobs successfully + Check Jobs Paused No @{job_types} + +Check Jobs Paused + [Arguments] ${paused}=No @{job_types} + FOR ${job_type} IN @{job_types} + Retry Double Keywords When Error Retry Element Click ${job_service_refresh_btn} Retry Wait Element Visible //clr-datagrid//clr-dg-row[contains(.,'${job_type}')]//clr-dg-cell[4][contains(.,'${paused}')] + Select Jobs ${job_type} + Run Keyword If '${paused}' == 'No' Run Keywords + ... Retry Wait Element Should Be Disabled ${job_service_resume_btn} + ... AND Retry Wait Element ${job_service_pause_btn} + ... ELSE Run Keywords + ... Retry Wait Element Should Be Disabled ${job_service_pause_btn} + ... AND Retry Wait Element ${job_service_resume_btn} + END + +Check Jobs Pending Count + [Arguments] &{jobs_type_pending_count} + FOR ${job_type} IN @{jobs_type_pending_count.keys()} + Retry Wait Element Visible //clr-datagrid//clr-dg-row[contains(.,'${job_type}')]//clr-dg-cell[2][contains(.,'${jobs_type_pending_count['${job_type}']}')] + END + +Check Pending Job Card + [Arguments] &{jobs_type_pending_count} + ${total}= Set Variable ${jobs_type_pending_count['Total']} + Remove From Dictionary ${jobs_type_pending_count} Total + ${total_pending_count}= Set Variable 0 + ${index}= Set Variable 1 + FOR ${job_type} IN @{jobs_type_pending_count.keys()} + Run Keyword If '${total}' != '0' Retry Wait Until Page Contains Element //app-pending-job-card//div[contains(@class,'clr-row ng-star-inserted')][${index}]//div[1][contains(.,'${job_type}')] + Retry Wait Until Page Contains Element //app-pending-job-card//div[contains(@class,'clr-row ng-star-inserted')][${index}]//div[2][contains(.,'${jobs_type_pending_count['${job_type}']}')] + ${index}= Evaluate ${index} + 1 + ${total_pending_count}= Evaluate ${total_pending_count} + ${jobs_type_pending_count['${job_type}']} + END + Retry Wait Element Visible //app-pending-job-card//div[contains(text(),'Total: ${total_pending_count}')] + +Check Jobs Latency + [Arguments] &{jobs_type_is_zore} + FOR ${job_type} IN @{jobs_type_is_zore.keys()} + ${latency_xpath}= Set Variable //clr-datagrid//clr-dg-row[contains(.,'${job_type}')]//clr-dg-cell[3][text()='0'] + Run Keyword If ${jobs_type_is_zore['${job_type}']}==${true} Retry Wait Until Page Contains Element ${latency_xpath} + ... ELSE Retry Wait Until Page Not Contains Element ${latency_xpath} + END + +Check Button Status + # Pause is Yes + Select Jobs GARBAGE_COLLECTION + Retry Wait Element ${job_service_resume_btn} + Retry Wait Element Should Be Disabled ${job_service_pause_btn} + # Pause is Yes + Select Jobs PURGE_AUDIT + Retry Wait Element ${job_service_resume_btn} + Retry Wait Element Should Be Disabled ${job_service_pause_btn} + # Pause is No + Select Jobs SCAN_DATA_EXPORT + Retry Wait Element Should Be Disabled ${job_service_resume_btn} + Retry Wait Element Should Be Disabled ${job_service_pause_btn} + # Refresh + Retry Element Click ${job_service_refresh_btn} + # Pause is No + Select Jobs REPLICATION + Retry Wait Element ${job_service_pause_btn} + Retry Wait Element Should Be Disabled ${job_service_resume_btn} + # Pause is No + Select Jobs P2P_PREHEAT + Retry Wait Element ${job_service_pause_btn} + Retry Wait Element Should Be Disabled ${job_service_resume_btn} + # Pause is Yes + Select Jobs IMAGE_SCAN + Retry Wait Element Should Be Disabled ${job_service_resume_btn} + Retry Wait Element Should Be Disabled ${job_service_pause_btn} diff --git a/tests/resources/Harbor-Pages/Job_Service_Dashboard_Elements.robot b/tests/resources/Harbor-Pages/Job_Service_Dashboard_Elements.robot new file mode 100644 index 000000000..f03926d77 --- /dev/null +++ b/tests/resources/Harbor-Pages/Job_Service_Dashboard_Elements.robot @@ -0,0 +1,23 @@ +# Copyright Project Harbor Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License + +*** Settings *** +Documentation This resource provides any keywords related to the Harbor private registry appliance + +*** Variables *** +${job_service_stop_btn} //button[.//span[text()=' STOP ']] +${job_service_stop_all_btn} //button[contains(.,'STOP ALL')] +${job_service_pause_btn} //button[contains(text(),'PAUSE')] +${job_service_resume_btn} //button[contains(text(),'RESUME')] +${job_service_refresh_btn} //clr-datagrid//span[contains(@class,'refresh-btn')] diff --git a/tests/resources/Harbor-Pages/Log_Rotation.robot b/tests/resources/Harbor-Pages/Log_Rotation.robot index d0be45298..b6270a6b3 100644 --- a/tests/resources/Harbor-Pages/Log_Rotation.robot +++ b/tests/resources/Harbor-Pages/Log_Rotation.robot @@ -26,8 +26,8 @@ Purge Now Retry Double Keywords When Error Retry Element Click ${keep_records_unit_select} Retry Element Click ${keep_records_unit_select}//option[contains(.,'${keep_records_unit}')] ${len}= Get Length ${exclude_operations} Run Keyword If ${len} > 0 Click Exclude Operation @{exclude_operations} - Retry Double Keywords When Error Retry Button Click ${purge_now_btn} Retry Wait Until Page Contains Element ${latest_purge_job_status_xpath}\[contains(.,'SUCCESS')] - Retry Action Keyword Verify Last completed Time + Retry Double Keywords When Error Retry Button Click ${purge_now_btn} Retry Wait Until Page Contains Element ${latest_purge_job_status_xpath}\[contains(.,'${expected_status}')] + Run Keyword If '${expected_status}' == 'SUCCESS' Retry Action Keyword Verify Last completed Time Click Exclude Operation [Arguments] @{exclude_operations} @@ -44,7 +44,7 @@ Set Log Rotation Schedule [Arguments] ${keep_records} ${keep_records_unit} ${type} ${cron}=${null} ${exclude_operations}=@{EMPTY} Retry Text Input ${keep_records_input} ${keep_records} Retry Double Keywords When Error Retry Element Click ${keep_records_unit_select} Retry Element Click ${keep_records_unit_select}//option[contains(.,'${keep_records_unit}')] - Retry Button Click ${log_rotation_schedule_edit_btn} + Retry Button Click ${log_rotation_schedule_edit_btn} Retry Double Keywords When Error Retry Element Click ${log_rotation_schedule_select} Retry Element Click ${log_rotation_schedule_select}//option[contains(.,'${type}')] Run Keyword If '${type}' == 'Custom' Retry Text Input ${log_rotation_schedule_cron_input} ${cron} ${len}= Get Length ${exclude_operations} @@ -55,4 +55,4 @@ Get Purge Job Results ${cmd}= Set Variable curl -u ${HARBOR_ADMIN}:${HARBOR_PASSWORD} -s --insecure -H "Content-Type: application/json" -X GET "https://${ip}/api/v2.0/system/purgeaudit?sort=-creation_time&page=1&page_size=100" ${rc} ${output}= Run And Return Rc And Output ${cmd} Log ${output} - [Return] ${output} \ No newline at end of file + [Return] ${output} diff --git a/tests/resources/Harbor-Pages/Project-Tag-Retention.robot b/tests/resources/Harbor-Pages/Project-Tag-Retention.robot index 2881682bf..b7ddd7024 100644 --- a/tests/resources/Harbor-Pages/Project-Tag-Retention.robot +++ b/tests/resources/Harbor-Pages/Project-Tag-Retention.robot @@ -88,7 +88,7 @@ Set Daily Schedule Execute Result Should Be [Arguments] ${image} ${result} FOR ${idx} IN RANGE 0 20 - ${out} Run Keyword And Ignore Error Retry Wait Until Page Contains Element xpath=//div[contains(@role, 'grid')]//div[contains(@class, 'datagrid-row-master') and contains(@role, 'row')]//clr-datagrid//div[contains(@role, 'grid')]//div[contains(@class, 'datagrid-row-master') and contains(@role, 'row')]//div[contains(@class, 'datagrid-row-scrollable') and contains(., '${result}') and contains(., '${image}')] + ${out} Run Keyword And Ignore Error Retry Wait Until Page Contains Element //app-tag-retention-tasks//clr-datagrid//clr-dg-row[contains(., '${image}') and contains(., '${result}')] Exit For Loop If '${out[0]}'=='PASS' Sleep 1 Retry Element Click ${project_tag_retention_refresh_xpath} @@ -101,19 +101,20 @@ Execute Result Should Be Execute Dry Run [Arguments] ${image} ${result} Retry Element Click xpath=${project_tag_retention_dry_run_xpath} - Retry Wait Until Page Contains Element xpath=${project_tag_retention_record_yes_xpath} - Sleep 5 - Retry Element Click xpath=${project_tag_retention_record_yes_xpath} - # memcached:123 should be deleted and hello-world:latest should be retained + Retry Button Click //clr-expandable-animation//button[1] Execute Result Should Be ${image} ${result} + ${execution_id}= Get Text ${project_tag_retention_latest_execution_id_xpath} + [Return] ${execution_id} Execute Run [Arguments] ${image} ${result}=${null} Retry Element Click xpath=${project_tag_retention_run_now_xpath} Retry Element Click xpath=${project_tag_retention_execute_run_xpath} - Retry Wait Until Page Contains Element xpath=${project_tag_retention_record_no_xpath} - Sleep 5 - Retry Element Click xpath=${project_tag_retention_record_no_xpath} - # memcached:123 should be deleted and hello-world:latest should be retained + Retry Button Click //clr-expandable-animation//button Run Keyword If '${result}' != '${null}' Execute Result Should Be ${image} ${result} + ${execution_id}= Get Text ${project_tag_retention_latest_execution_id_xpath} + [Return] ${execution_id} +Check Retention Execution + [Arguments] ${execution_id} ${status} ${dry_run} + Retry Wait Until Page Contains Element //clr-datagrid//clr-dg-row//div[contains(., '${execution_id}') and contains(., '${status}') and contains(., '${dry_run}')] diff --git a/tests/resources/Harbor-Pages/Project-Tag-Retention_Elements.robot b/tests/resources/Harbor-Pages/Project-Tag-Retention_Elements.robot index d0ac19b12..328b08052 100644 --- a/tests/resources/Harbor-Pages/Project-Tag-Retention_Elements.robot +++ b/tests/resources/Harbor-Pages/Project-Tag-Retention_Elements.robot @@ -41,6 +41,7 @@ ${project_tag_retention_action_button_xpath} //button[contains(.,'ACTION')] ${project_tag_retention_delete_button_xpath} //div[contains(@class,'dropdown-menu')]//button[contains(.,'Delete')] ${project_tag_retention_edit_button_xpath} //div[contains(@class,'dropdown-menu')]//button[contains(.,'Edit')] ${project_tag_retention_modal_title_edit_xpath} //h3[contains(.,'Edit Tag Retention Rule')] +${project_tag_retention_latest_execution_id_xpath} //clr-dg-row[1]//clr-dg-cell[1] ${project_tag_immutability_scope_input_xpath} //*[@id='scope-input'] ${project_tag_immutability_tag_input_xpath} //*[@id='tag-input'] diff --git a/tests/resources/Harbor-Pages/Replication.robot b/tests/resources/Harbor-Pages/Replication.robot index e4c3532d0..a5f30778a 100644 --- a/tests/resources/Harbor-Pages/Replication.robot +++ b/tests/resources/Harbor-Pages/Replication.robot @@ -296,4 +296,4 @@ Executions Result Count Should Be Check Latest Replication Job Status [Arguments] ${expected_status} - Retry Wait Element //hbr-replication//div[contains(@class,'datagrid')]//clr-dg-row[1][contains(.,'${expected_status}')] \ No newline at end of file + Retry Wait Element //hbr-replication//div[contains(@class,'datagrid')]//clr-dg-row[1][contains(.,'${expected_status}')] diff --git a/tests/resources/Harbor-Pages/Vulnerability.robot b/tests/resources/Harbor-Pages/Vulnerability.robot index 3539e517d..2b91bf2d0 100644 --- a/tests/resources/Harbor-Pages/Vulnerability.robot +++ b/tests/resources/Harbor-Pages/Vulnerability.robot @@ -27,7 +27,6 @@ Switch To Vulnerability Page Retry Element Click xpath=//app-interrogation-services//a[contains(.,'Vulnerability')] Retry Wait Element ${scan_now_button} - Set Vulnerabilty Serverity #0 is critical, 1 is high, 2 is medium, 3 is low, 4 is negligible. [Arguments] ${level} @@ -117,4 +116,4 @@ Stop Scan All Artifact 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 \ No newline at end of file + Should Be True ${stopped_total} > 0 diff --git a/tests/resources/Util.robot b/tests/resources/Util.robot index bb733d8b0..bcdc85b0f 100644 --- a/tests/resources/Util.robot +++ b/tests/resources/Util.robot @@ -71,6 +71,8 @@ Resource Harbor-Pages/Logs.robot Resource Harbor-Pages/Logs_Elements.robot Resource Harbor-Pages/Log_Rotation.robot Resource Harbor-Pages/Log_Rotation_Elements.robot +Resource Harbor-Pages/Job_Service_Dashboard.robot +Resource Harbor-Pages/Job_Service_Dashboard_Elements.robot Resource Harbor-Pages/Verify.robot Resource Docker-Util.robot Resource CNAB_Util.robot @@ -318,4 +320,4 @@ Click Link New Tab And Switch [Arguments] ${element_xpath} Retry Link Click ${element_xpath} ${handles}= Get Window Handles - Retry Action Keyword Switch Window ${handles}[-1] \ No newline at end of file + Retry Action Keyword Switch Window ${handles}[-1] diff --git a/tests/robot-cases/Group1-Nightly/Common.robot b/tests/robot-cases/Group1-Nightly/Common.robot index 17e6baabf..ffd98e7cf 100644 --- a/tests/robot-cases/Group1-Nightly/Common.robot +++ b/tests/robot-cases/Group1-Nightly/Common.robot @@ -529,7 +529,7 @@ Test Case - Copy A Image And Accessory 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 @@ -1029,4 +1029,78 @@ Test Case - Export CVE ${csv_file_content}= Create List ${csv_file} ${actual_cve_data}= Split To Lines @{csv_file_content} 1 Lists Should Be Equal ${expected_cve_data} ${actual_cve_data} ignore_order=True - Close Browser \ No newline at end of file + Close Browser + +Test Case - Job Service Dashboard Job Queues + [Tags] job_service_job_queues + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + # Pause GARBAGE_COLLECTION PURGE_AUDIT IMAGE_SCAN RETENTION jobs + Switch To Job Queues + Pause Jobs GARBAGE_COLLECTION PURGE_AUDIT IMAGE_SCAN RETENTION + Check Button Status + Create An New Project And Go Into Project project${d} + Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} photon 2.0_scan 2.0_scan + Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} photon 3.0_scan 3.0_scan + Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} photon 4.0_scan 4.0_scan + Switch To Tag Retention + Add A Tag Retention Rule + # Triggers two RETENTION jobs + ${retention_execution1}= Execute Dry Run photon 0/0 + ${retention_execution2}= Execute Run photon 0/0 + # Triggers three IMAGE_SCAN jobs + Switch To Project Repo + Go Into Repo photon + Retry Element Click //clr-datagrid//label[contains(.,'Select All')] + Retry Button Click ${scan_artifact_btn} + # Triggers a GARBAGE_COLLECTION job + ${gc_execution1}= GC Now dry_run=${true} + # Triggers a PURGE_AUDIT job + Switch to Log Rotation + Purge Now 2 Days Running + # Check job queues + Switch To Job Queues + Check Pending Job Card IMAGE_SCAN=3 RETENTION=2 Others=2 Total=7 + Check Jobs Pending Count IMAGE_SCAN=3 RETENTION=2 GARBAGE_COLLECTION=1 PURGE_AUDIT=1 + Check Jobs Latency GARBAGE_COLLECTION=${false} PURGE_AUDIT=${false} IMAGE_SCAN=${false} RETENTION=${false} + # Resume GARBAGE_COLLECTION RETENTION jobs + Resume Jobs GARBAGE_COLLECTION RETENTION + # Check job queues + Check Pending Job Card IMAGE_SCAN=3 PURGE_AUDIT=1 Others=0 Total=4 + Check Jobs Pending Count IMAGE_SCAN=3 RETENTION=0 GARBAGE_COLLECTION=0 PURGE_AUDIT=1 + Check Jobs Latency GARBAGE_COLLECTION=${true} PURGE_AUDIT=${false} IMAGE_SCAN=${false} RETENTION=${true} + # Check retention and GC status + Go Into Project project${d} + Switch To Tag Retention + Check Retention Execution ${retention_execution1} Success Yes + Check Retention Execution ${retention_execution2} Success No + Retry GC Should Be Successful ${gc_execution1} success to run gc in job + # Stop PURGE_AUDIT IMAGE_SCAN jobs + Switch To Job Queues + Stop Pending Jobs PURGE_AUDIT IMAGE_SCAN + # Check job queues + Check Pending Job Card first_job=0 second_job=0 the_third_job=0 Total=0 + Check Jobs Pending Count IMAGE_SCAN=0 PURGE_AUDIT=0 + Check Jobs Latency GARBAGE_COLLECTION=${true} PURGE_AUDIT=${true} IMAGE_SCAN=${true} RETENTION=${true} + # Triggers a PURGE_AUDIT job + Switch to Log Rotation + Purge Now 1 Days Running + # Triggers three IMAGE_SCAN jobs + Go Into Project project${d} + Go Into Repo photon + Retry Element Click //clr-datagrid//label[contains(.,'Select All')] + Retry Button Click ${scan_artifact_btn} + # Check job queues + Switch To Job Queues + Check Pending Job Card IMAGE_SCAN=3 PURGE_AUDIT=1 Others=0 Total=4 + Check Jobs Pending Count IMAGE_SCAN=3 PURGE_AUDIT=1 + Check Jobs Latency IMAGE_SCAN=${false} PURGE_AUDIT=${false} + # Stop all job + Stop All Pending Jobs + # Check job queues + Check Pending Job Card first_job=0 second_job=0 the_third_job=0 Total=0 + Check Jobs Pending Count IMAGE_SCAN=0 PURGE_AUDIT=0 + Check Jobs Latency IMAGE_SCAN=${true} PURGE_AUDIT=${true} + Resume Jobs IMAGE_SCAN PURGE_AUDIT + Close Browser