From dffb2bbd98d0406f0df357344e55b55f20a7d3ca Mon Sep 17 00:00:00 2001 From: danfengliu Date: Thu, 9 May 2019 15:44:48 +0800 Subject: [PATCH] Due to replication NG feature already in master branch, old replication UI test cases have been moved out of Jenkins pipeline, and here test case and has been finished and ready for duty. Other modification is add retry for keywords in UserProfile.robot (#7611) Signed-off-by: danfengliu --- .../Project-Helmcharts_Elements.robot | 1 + .../resources/Harbor-Pages/Replication.robot | 117 ++++++++++-------- .../Harbor-Pages/Replication_Elements.robot | 19 ++- .../resources/Harbor-Pages/UserProfile.robot | 38 +++--- .../Harbor-Pages/UserProfile_Elements.robot | 28 +++++ tests/resources/Util.robot | 10 ++ .../Group1-Nightly/Replication.robot | 106 +++++++++++++++- tests/robot-indices/BuiltIn.index | 2 +- 8 files changed, 239 insertions(+), 82 deletions(-) create mode 100644 tests/resources/Harbor-Pages/UserProfile_Elements.robot diff --git a/tests/resources/Harbor-Pages/Project-Helmcharts_Elements.robot b/tests/resources/Harbor-Pages/Project-Helmcharts_Elements.robot index e5855b168..9ddec4fd0 100644 --- a/tests/resources/Harbor-Pages/Project-Helmcharts_Elements.robot +++ b/tests/resources/Harbor-Pages/Project-Helmcharts_Elements.robot @@ -11,6 +11,7 @@ ${upload_action_button} //clr-modal//form/div/button[contains(.,'Upload')] ${harbor_chart_name} harbor ${harbor_chart_filename} harbor-0.2.0.tgz +${harbor_chart_version} 0.2.0 ${harbor_chart_prov_filename} harbor-0.2.0.tgz.prov ${harbor_chart_file_url} https://storage.googleapis.com/harbor-builds/helm-chart-test-files/harbor-0.2.0.tgz ${harbor_chart_prov_file_url} https://storage.googleapis.com/harbor-builds/helm-chart-test-files/harbor-0.2.0.tgz.prov diff --git a/tests/resources/Harbor-Pages/Replication.robot b/tests/resources/Harbor-Pages/Replication.robot index e675fb8c7..2c8fbb929 100644 --- a/tests/resources/Harbor-Pages/Replication.robot +++ b/tests/resources/Harbor-Pages/Replication.robot @@ -44,20 +44,43 @@ Create A New Endpoint Run Keyword If '${save}' == 'N' No Operation Create A Rule With Existing Endpoint + [Arguments] ${name} ${replication_mode} ${project_name} ${resource_type} ${endpoint} ${dest_namespace_input} + ... ${mode}=Manual + #click new + Retry Element Click ${new_name_xpath} + #input name + Retry Text Input ${rule_name} ${name} + Run Keyword If '${replication_mode}' == 'push' Run Keywords Retry Element Click ${replication_mode_radio_push} + ... AND Retry Element Click //select[@id='dest_registry'] + ... AND Retry Element Click //select[@id='dest_registry']//option[contains(.,'${endpoint}')] + ... ELSE Run Keywords Retry Element Click ${replication_mode_radio_pull} + ... AND Retry Element Click //select[@id='src_registry_id'] + ... AND Retry Element Click //select[@id='src_registry_id']//option[contains(.,'${endpoint}')] + #set filter + Retry Text Input ${source_project} ${project_name} + Run Keyword And Ignore Error Select From List By Value ${rule_resource_selector} ${resource_type} + Retry Text Input ${dest_namespace_xpath} ${dest_namespace_input} + #set trigger + Retry Element Click //select[@id='ruleTrigger'] + Retry Element Click //select[@id='ruleTrigger']//option[contains(.,'${mode}')] + Run Keyword If '${mode}' == 'Scheduled' Log To Console Scheduled + #click save + Retry Double Keywords When Error Retry Element Click ${rule_save_button} Retry Wait Until Page Not Contains Element ${rule_save_button} + +Project Create A Rule With Existing Endpoint # day 1=Monday..7=Sunday timeformat 12hour+am/pm [Arguments] ${name} ${project_name} ${endpoint} ${mode} ${plan}=Daily ${weekday}=1 ${time}=0800a #click new Retry Element Click ${new_name_xpath} #input name - Input Text ${rule_name} ${name} + Retry Text Input ${rule_name} ${name} #input descripiton,here skip, leave it blank - #source projects, input - Input Text ${source_project} ${project_name} + #in this keyword, source project is not need to input #set filter Retry Element Click ${source_image_filter_add} - Input Text ${source_iamge_repo_filter} * + Retry Text Input ${source_iamge_repo_filter} * Retry Element Click ${source_image_filter_add} - Input Text ${source_image_tag_filter} * + Retry Text Input ${source_image_tag_filter} * #select endpoint Retry Element Click ${rule_target_select} Wait Until Element Is Visible //select[@id='ruleTarget']//option[contains(.,'${endpoint}')] @@ -66,33 +89,7 @@ Create A Rule With Existing Endpoint Retry Element Click ${rule_trigger_select} Wait Until Element Is Visible //select[@id='ruleTrigger']//option[contains(.,'${mode}')] Retry Element Click //select[@id='ruleTrigger']//option[contains(.,'${mode}')] - Run Keyword If '${mode}' == 'Scheduled' Setting Replicaiton Schedule ${plan} ${weekday} ${time} - #click save - Retry Element Click ${rule_save_button} - -Project Create A Rule With Existing Endpoint -# day 1=Monday..7=Sunday timeformat 12hour+am/pm - [Arguments] ${name} ${project_name} ${endpoint} ${mode} ${plan}=Daily ${weekday}=1 ${time}=0800a - #click new - Retry Element Click ${new_name_xpath} - #input name - Input Text ${rule_name} ${name} - #input descripiton,here skip, leave it blank - #in this keyword, source project is not need to input - #set filter - Retry Element Click ${source_image_filter_add} - Input Text ${source_iamge_repo_filter} * - Retry Element Click ${source_image_filter_add} - Input Text ${source_image_tag_filter} * - #select endpoint - Retry Element Click ${rule_target_select} - Wait Until Element Is Visible //select[@id='ruleTarget']//option[contains(.,'${endpoint}')] - Retry Element Click //select[@id='ruleTarget']//option[contains(.,'${endpoint}')] - #set trigger - Retry Element Click ${rule_trigger_select} - Wait Until Element Is Visible //select[@id='ruleTrigger']//option[contains(.,'${mode}')] - Retry Element Click //select[@id='ruleTrigger']//option[contains(.,'${mode}')] - Run Keyword If '${mode}' == 'Scheduled' Setting Replicaiton Schedule ${plan} ${weekday} ${time} + Run Keyword If '${mode}' == 'Scheduled' Setting Replication Schedule ${plan} ${weekday} ${time} #click save Retry Element Click ${rule_save_button} @@ -102,7 +99,7 @@ Setting Replication Schedule Wait Until Element Is Visible //select[@name='scheduleType']/option[@value='${plan}'] Retry Element Click //select[@name='scheduleType']/option[@value='${plan}'] Run Keyword If '${plan}' == 'Weekly' Setting Replication Weekday ${weekday} - Input Text ${shcedule_time} ${time} + Retry Text Input ${shcedule_time} ${time} Setting Replication Weekday [arguments] ${day} @@ -139,50 +136,46 @@ Switch To Replication Manage Trigger Replication Manual [Arguments] ${rule} Retry Element Click ${rule_filter_search} - Input Text ${rule_filter_input} ${rule} - Sleep 1 + Retry Text Input ${rule_filter_input} ${rule} Retry Element Click //clr-dg-row[contains(.,'${rule}')]//label Retry Element Click ${action_bar_replicate} - Wait Until Page Contains Element ${dialog_replicate} - #change from click to mouse down and up + Retry Wait Until Page Contains Element ${dialog_replicate} + #change from click to mouse down and up Mouse Down ${dialog_replicate} Mouse Up ${dialog_replicate} Sleep 2 - Wait Until Page Contains Element //clr-tab-content//div[contains(.,'${rule}')]/../div/clr-icon[@shape='success-standard'] + Retry Wait Until Page Contains Element //clr-tab-content//div[contains(.,'${rule}')]/../div/clr-icon[@shape='success-standard'] Sleep 1 Rename Rule [Arguments] ${rule} ${newname} Retry Element Click ${rule_filter_search} - Input Text ${rule_filter_input} ${rule} - Sleep 1 + Retry Text Input ${rule_filter_input} ${rule} Retry Element Click //clr-dg-row[contains(.,'${rule}')]//label Retry Element Click ${action_bar_edit} - Input Text ${rule_name} ${newname} + Retry Text Input ${rule_name} ${newname} Retry Element Click ${rule_save_button} Delete Rule - [Arguments] ${rule} + [Arguments] ${rule} Retry Element Click ${rule_filter_search} - Input Text ${rule_filter_input} ${rule} - Sleep 1 + Retry Text Input ${rule_filter_input} ${rule} Retry Element Click //clr-dg-row[contains(.,'${rule}')]//label Retry Element Click ${action_bar_delete} - Wait Until Page Contains Element ${dialog_delete} + Retry Wait Until Page Contains Element ${dialog_delete} #change from click to mouse down and up Mouse Down ${dialog_delete} Mouse Up ${dialog_delete} Sleep 2 Filter Rule - [Arguments] ${rule} + [Arguments] ${rule} Retry Element Click ${rule_filter_search} - Input Text ${rule_filter_input} ${rule} + Retry Text Input ${rule_filter_input} ${rule} Sleep 1 Select Rule [Arguments] ${rule} - Sleep 1 Retry Element Click //clr-dg-row[contains(.,'${rule}')]//label Stop Jobs @@ -191,26 +184,40 @@ Stop Jobs View Job Log [arguments] ${job} Retry Element Click ${job_filter_search} - Input Text ${job_filter_input} ${job} - Click Link //clr-dg-row[contains(.,'${job}')]//a + Retry Text Input ${job_filter_input} ${job} + Retry Link Click //clr-dg-row[contains(.,'${job}')]//a Rename Endpoint [arguments] ${name} ${newname} Filter Object ${name} Select Object ${name} Retry Element Click ${action_bar_edit} - Wait Until Page Contains Element ${destination_name_xpath} - Input Text ${destination_name_xpath} ${newname} + Retry Wait Until Page Contains Element ${destination_name_xpath} + Retry Text Input ${destination_name_xpath} ${newname} Retry Element Click ${replication_save_xpath} Delete Endpoint [Arguments] ${name} Retry Element Click ${endpoint_filter_search} - Input Text ${endpoint_filter_input} ${name} - Sleep 1 + Retry Text Input ${endpoint_filter_input} ${name} #click checkbox before target endpoint Retry Element Click //clr-dg-row[contains(.,'${name}')]//label - Sleep 1 Retry Element Click ${action_bar_delete} Wait Until Page Contains Element ${dialog_delete} Retry Element Click ${dialog_delete} + +Select Rule And Replicate + [Arguments] ${rule_name} + Retry Element Click //hbr-list-replication-rule//clr-dg-cell[contains(.,'${rule_name}')] + Retry Element Click ${replication_exec_id} + Retry Double Keywords When Error Retry Element Click xpath=${dialog_replicate} Retry Wait Until Page Not Contains Element xpath=${dialog_replicate} + +Delete Replication Rule + [Arguments] ${name} + Retry Element Click ${endpoint_filter_search} + Retry Text Input ${endpoint_filter_input} ${name} + #click checkbox before target endpoint + Retry Element Click //clr-dg-row[contains(.,'${name}')]//label + Retry Element Click ${action_bar_delete} + Wait Until Page Contains Element ${dialog_delete} + Retry Element Click ${dialog_delete} \ No newline at end of file diff --git a/tests/resources/Harbor-Pages/Replication_Elements.robot b/tests/resources/Harbor-Pages/Replication_Elements.robot index b1bdd9097..a8ec95fe8 100644 --- a/tests/resources/Harbor-Pages/Replication_Elements.robot +++ b/tests/resources/Harbor-Pages/Replication_Elements.robot @@ -33,7 +33,6 @@ ${new_replication-rule_button} //button[contains(.,'New Replication Rule')] ${link_to_registries} //clr-modal//span[contains(.,'Endpoint')] ${new_endpoint_button} //hbr-endpoint//button[contains(.,'New Endpoint')] ${rule_name} //input[@id='ruleName'] -${source_project} //input[@value='name'] ${source_image_filter_add} //hbr-create-edit-rule/clr-modal//clr-icon[@id='add-label-list'] ${source_iamge_repo_filter} //hbr-create-edit-rule//section/div[4]/div/div[1]/div/label/input ${source_image_tag_filter} //hbr-create-edit-rule//section/div[4]/div/div[2]/div/label/input @@ -61,3 +60,21 @@ ${dialog_replicate} //clr-modal//button[contains(.,'REPLICATE')] ${action_bar_replicate} //button[contains(.,'Replicate')] ${rule_save_button} //button[contains(.,'SAVE')] ${provider_selector} //*[@id='adapter'] +${replication_mode_radio_push} //clr-main-container//hbr-create-edit-rule//label[contains(.,'Push-based')] +${replication_mode_radio_pull} //clr-main-container//hbr-create-edit-rule//label[contains(.,'Pull-based')] +${source_project} //input[@id='filter_name'] +${rule_resource_selector} //*[@id='select_resource'] +${trigger_mode_selector} //*[@id='ruleTrigger'] +${dest_namespace_xpath} //*[@id='dest_namespace'] +${new_replication_rule_id} //*[@id='new_replication_rule_id'] +${edit_replication_rule_id} //*[@id='edit_replication_rule_id'] +${delete_replication_rule_id} //*[@id='delete_replication_rule_id'] +${replication_exec_id} //*[@id='replication_exe_id'] +${replication_task_line_1} //clr-datagrid//clr-dg-row/div/div[2]//clr-checkbox-wrapper/label[1] +${filter_tag} //*[@id='filter_tag'] +${is_overide_xpath} //label[contains(.,'Replace the destination resources if name exists')] +${enable_rule_xpath} //label[contains(.,'Enable rule')] +${targetCron_id} //*[@id='targetCron'] + + + diff --git a/tests/resources/Harbor-Pages/UserProfile.robot b/tests/resources/Harbor-Pages/UserProfile.robot index 6be351bc0..f20b1765e 100644 --- a/tests/resources/Harbor-Pages/UserProfile.robot +++ b/tests/resources/Harbor-Pages/UserProfile.robot @@ -22,36 +22,26 @@ ${HARBOR_VERSION} v1.1.1 *** Keywords *** Change Password [Arguments] ${cur_pw} ${new_pw} - Click Element xpath=/html/body/harbor-app/harbor-shell/clr-main-container/navigator/clr-header/div[3]/clr-dropdown[2]/button/span - Click Element xpath=//clr-main-container//clr-dropdown//a[2] - Sleep 2 - Input Text xpath=//*[@id='oldPassword'] ${cur_pw} - Input Text xpath=//*[@id='newPassword'] ${new_pw} - Input Text xpath=//*[@id='reNewPassword'] ${new_pw} - Sleep 1 - Click Element xpath=//password-setting/clr-modal//button[2] - Sleep 2 - Click Element xpath=${log_xpath} + Retry Element Click ${head_admin_xpath} + Retry Element Click ${change_password_xpath} + Retry Text Input ${old_password_xpath} ${cur_pw} + Retry Text Input ${new_password_xpath} ${new_pw} + Retry Text Input ${renew_password_xpath} ${new_pw} + Retry Element Click ${change_password_confirm_btn_xpath} + Retry Element Click xpath=${log_xpath} Sleep 1 Update User Comment [Arguments] ${new_comment} - Click Element xpath=/html/body/harbor-app/harbor-shell/clr-main-container/navigator/clr-header/div[3]/clr-dropdown[2]/button/span - Click Element xpath=//clr-main-container//clr-dropdown//a[1] - Sleep 2 - Input Text xpath=//*[@id='account_settings_comments'] ${new_comment} - Sleep 1 - Click Element xpath=//account-settings-modal/clr-modal//button[2] + Retry Element Click ${head_admin_xpath} + Retry Element Click ${user_profile_xpath} + Retry Text Input ${account_settings_comments_xpath} ${new_comment} + Retry Element Click ${user_profile_confirm_btn_xpath} Sleep 2 Logout Harbor - Wait Until Element Is Visible xpath=/html/body/harbor-app/harbor-shell/clr-main-container/navigator/clr-header/div[3]/clr-dropdown[2]/button/span - Wait Until Element Is Enabled xpath=/html/body/harbor-app/harbor-shell/clr-main-container/navigator/clr-header/div[3]/clr-dropdown[2]/button/span - Click Element xpath=/html/body/harbor-app/harbor-shell/clr-main-container/navigator/clr-header/div[3]/clr-dropdown[2]/button/span - Sleep 2 - Click Link Log Out - #Click Element xpath=//harbor-app/harbor-shell/clr-main-container/navigator/clr-header//clr-dropdown//a[4] - Sleep 1 + Retry Element Click ${head_admin_xpath} + Retry Link Click Log Out Capture Page Screenshot Logout.png Sleep 2 - Wait Until Keyword Succeeds 5x 1 Page Should Contain Element xpath=//sign-in//form//*[@class='title'] + Wait Until Keyword Succeeds 5x 1 Page Should Contain Element ${sign_in_title_xpath} \ No newline at end of file diff --git a/tests/resources/Harbor-Pages/UserProfile_Elements.robot b/tests/resources/Harbor-Pages/UserProfile_Elements.robot new file mode 100644 index 000000000..50b3dc0d2 --- /dev/null +++ b/tests/resources/Harbor-Pages/UserProfile_Elements.robot @@ -0,0 +1,28 @@ +# 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 *** +${head_admin_xpath} xpath=/html/body/harbor-app/harbor-shell/clr-main-container/navigator/clr-header/div[3]/clr-dropdown[2]/button/span +${change_password_xpath} xpath=//clr-main-container//clr-dropdown//a[2] +${user_profile_xpath} xpath=//clr-main-container//clr-dropdown//a[1] +${old_password_xpath} xpath=//*[@id='oldPassword'] +${new_password_xpath} xpath=//*[@id='newPassword'] +${renew_password_xpath} xpath=//*[@id='reNewPassword'] +${change_password_confirm_btn_xpath} xpath=//password-setting/clr-modal//button[2] +${user_profile_confirm_btn_xpath} xpath=//account-settings-modal/clr-modal//button[2] +${sign_in_title_xpath} xpath=//sign-in//form//*[@class='title'] +${account_settings_comments_xpath} xpath=//*[@id='account_settings_comments'] diff --git a/tests/resources/Util.robot b/tests/resources/Util.robot index 5b2971676..9abe570c5 100644 --- a/tests/resources/Util.robot +++ b/tests/resources/Util.robot @@ -45,6 +45,7 @@ Resource Harbor-Pages/Project-Retag_Elements.robot Resource Harbor-Pages/Replication.robot Resource Harbor-Pages/Replication_Elements.robot Resource Harbor-Pages/UserProfile.robot +Resource Harbor-Pages/UserProfile_Elements.robot Resource Harbor-Pages/Administration-Users.robot Resource Harbor-Pages/Administration-Users_Elements.robot Resource Harbor-Pages/Configuration.robot @@ -98,6 +99,11 @@ Retry Text Input @{param} Create List ${element_xpath} ${text} Retry Action Keyword Text Input @{param} +Retry Link Click + [Arguments] ${element_xpath} + @{param} Create List ${element_xpath} + Retry Action Keyword Link Click @{param} + Retry Checkbox Should Be Selected [Arguments] ${element_xpath} @{param} Create List ${element_xpath} @@ -123,6 +129,10 @@ Retry Wait Until Page Not Contains Element @{param} Create List ${element_xpath} Retry Action Keyword Wait Until Page Does Not Contain Element @{param} +Link Click + [Arguments] ${element_xpath} + Click Link ${element_xpath} + Element Click [Arguments] ${element_xpath} Wait Until Element Is Visible And Enabled ${element_xpath} diff --git a/tests/robot-cases/Group1-Nightly/Replication.robot b/tests/robot-cases/Group1-Nightly/Replication.robot index 6b03a4add..70edaf880 100644 --- a/tests/robot-cases/Group1-Nightly/Replication.robot +++ b/tests/robot-cases/Group1-Nightly/Replication.robot @@ -60,7 +60,7 @@ Test Case - DockerHub Endpoint Add ${d}= Get Current Date result_format=%M%S Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Switch To Registries - Create A New Endpoint dockerHub edp1${d} https://hub.docker.com/ danfengliu Aa123456 Y + Create A New Endpoint docker-hub edp1${d} https://hub.docker.com/ danfengliu Aa123456 Y Close Browser Test Case - Harbor Endpoint Add @@ -88,4 +88,108 @@ Test Case - Harbor Endpoint Delete Switch To Registries Delete Endpoint deletea Delete Success deletea + Close Browser + +Test Case - Replication Of Pull Images from DockerHub To Self + Init Chrome Driver + ${d}= Get Current Date result_format=%M%S + #login source + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project${d} + Switch To Registries + Create A New Endpoint docker-hub e${d} https://hub.docker.com/ danfengliu Aa123456 Y + Switch To Replication Manage + Create A Rule With Existing Endpoint rule${d} pull danfengliu/* image e${d} project${d} + Select Rule And Replicate rule${d} + Sleep 20 + Go Into Project project${d} + Switch To Project Repo + #In docker-hub, under repository danfengliu, there're only 2 images: centos,mariadb. + Retry Wait Until Page Contains project${d}/centos + Retry Wait Until Page Contains project${d}/mariadb + Close Browser + +Test Case - Replication Of Push Images from Self To Harbor + Init Chrome Driver + ${d}= Get Current Date result_format=%M%S + #login source + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project${d} + Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} hello-world + Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} busybox:latest + Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} hello-world v1 + Switch To Registries + Create A New Endpoint harbor e${d} https://${ip1} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Switch To Replication Manage + Create A Rule With Existing Endpoint rule${d} push project${d}/* image e${d} project_dest${d} + #logout and login target + Logout Harbor + Sign In Harbor https://${ip1} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project_dest${d} + #logout and login source + Logout Harbor + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Switch To Replication Manage + Select Rule And Replicate rule${d} + Sleep 20 + Logout Harbor + Sign In Harbor https://${ip1} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Go Into Project project_dest${d} + Switch To Project Repo + Retry Wait Until Page Contains project_dest${d}/hello-world + Retry Wait Until Page Contains project_dest${d}/busybox + Close Browser + +Test Case - Replication Of Push Chart from Self To Harbor + Init Chrome Driver + ${d}= Get Current Date result_format=%M%S + #login source + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project${d} + Go Into Project project${d} has_image=${false} + Switch To Project Charts + Upload Chart files + Switch To Registries + Create A New Endpoint harbor e${d} https://${ip1} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Switch To Replication Manage + Create A Rule With Existing Endpoint rule${d} push project${d}/* chart e${d} project_dest${d} + #logout and login target + Logout Harbor + Sign In Harbor https://${ip1} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project_dest${d} + #logout and login source + Logout Harbor + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Switch To Replication Manage + Select Rule And Replicate rule${d} + Sleep 20 + Logout Harbor + Sign In Harbor https://${ip1} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Go Into Project project_dest${d} has_image=${false} + Switch To Project Charts + Go Into Chart Version ${harbor_chart_name} + Retry Wait Until Page Contains ${harbor_chart_version} + Go Into Chart Detail ${harbor_chart_version} + Close Browser + +Test Case - Replication Of Push Images from Self To Harbor By Push Event + Init Chrome Driver + ${d}= Get Current Date result_format=%M%S + #login source + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project${d} + Switch To Registries + Create A New Endpoint harbor e${d} https://${ip1} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Switch To Replication Manage + Create A Rule With Existing Endpoint rule${d} push project${d}/* image e${d} project_dest${d} + ... Event Based + #logout and login target + Logout Harbor + Sign In Harbor https://${ip1} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project_dest${d} + Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} centos + Sleep 10 + Go Into Project project_dest${d} + Switch To Project Repo + Retry Wait Until Page Contains project_dest${d}/centos Close Browser \ No newline at end of file diff --git a/tests/robot-indices/BuiltIn.index b/tests/robot-indices/BuiltIn.index index af81aac5a..b1c9f8bf0 100644 --- a/tests/robot-indices/BuiltIn.index +++ b/tests/robot-indices/BuiltIn.index @@ -98,4 +98,4 @@ Should Start With Sleep Variable Should Exist Variable Should Not Exist -Wait Until Keyword Succeeds \ No newline at end of file +Wait Until Keyword Succeeds \ No newline at end of file