Merge pull request #15302 from danfengliu/fix-replication-test-issue-in-nightly

Fix replication test issue in nightly
This commit is contained in:
danfengliu 2021-07-15 10:37:05 +08:00 committed by GitHub
commit 5d11d61154
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 14 deletions

View File

@ -254,7 +254,7 @@ Click Index Achieve
Retry Element Click //artifact-list-tab//clr-datagrid//clr-dg-row[contains(.,'sha256') and contains(.,'${tag_name}')]//clr-dg-cell[1]//clr-tooltip//a
Go Into Index And Contain Artifacts
[Arguments] ${tag_name} ${total_artifact_count}=3 ${archive_count}=0
[Arguments] ${tag_name} ${total_artifact_count}=3 ${archive_count}=0 ${return_immediately}=${false}
Retry Double Keywords When Error Click Index Achieve ${tag_name} Page Should Contain Element ${tag_table_column_os_arch}
FOR ${n} IN RANGE 1 10
${out1} Run Keyword And Ignore Error Page Should Contain Element ${artifact_rows} limit=${total_artifact_count}
@ -262,7 +262,8 @@ Go Into Index And Contain Artifacts
Exit For Loop If '${out1[0]}'=='PASS' and '${out2[0]}'=='PASS'
Sleep 3
END
Run Keyword If '${out1[0]}'=='FAIL' or '${out2[0]}'=='FAIL' Capture Page Screenshot
${result}= Set Variable If '${out1[0]}'=='FAIL' or '${out2[0]}'=='FAIL' FAIL PASS
Return From Keyword If '${return_immediately}' == '${true}' ${result}
Should Be Equal As Strings '${out1[0]}' 'PASS'
Should Be Equal As Strings '${out2[0]}' 'PASS'

View File

@ -243,17 +243,16 @@ Image Should Be Replicated To Project
Switch To Project Repo
${out} Run Keyword And Ignore Error Retry Wait Until Page Contains ${project}/${image}
Log To Console Return value is ${out[0]}
Exit For Loop If '${out[0]}'=='PASS'
Sleep 5
Continue For Loop If '${out[0]}'=='FAIL'
Go Into Repo ${project}/${image}
${size}= Run Keyword If '${tag}'!='${EMPTY}' and '${expected_image_size_in_regexp}'!='${null}' Get Text //clr-dg-row[contains(., '${tag}')]//clr-dg-cell[4]/div
Run Keyword If '${tag}'!='${EMPTY}' and '${expected_image_size_in_regexp}'!='${null}' Should Match Regexp '${size}' '${expected_image_size_in_regexp}'
Run Keyword If '${total_artifact_count}'!='${null}' Should Not Be Empty ${tag}
${out} Run Keyword If '${total_artifact_count}'!='${null}' Go Into Index And Contain Artifacts ${tag} total_artifact_count=${total_artifact_count} archive_count=${archive_count} return_immediately=${true}
Log All out: ${out}
Exit For Loop If '${out}'=='PASS'
Sleep 30
END
Run Keyword If '${out[0]}'=='FAIL' Capture Page Screenshot
Should Be Equal As Strings '${out[0]}' 'PASS'
Go Into Repo ${project}/${image}
${size}= Run Keyword If '${tag}'!='${EMPTY}' and '${expected_image_size_in_regexp}'!='${null}' Get Text //clr-dg-row[contains(., '${tag}')]//clr-dg-cell[4]/div
Run Keyword If '${tag}'!='${EMPTY}' and '${expected_image_size_in_regexp}'!='${null}' Should Match Regexp '${size}' '${expected_image_size_in_regexp}'
Run Keyword If '${total_artifact_count}'!='${null}' Run Keywords
... Should Not Be Empty ${tag}
... AND Go Into Index And Contain Artifacts ${tag} total_artifact_count=${total_artifact_count} archive_count=${archive_count}
Executions Result Count Should Be
[Arguments] ${expected_status} ${expected_trigger_type} ${expected_result_count}

View File

@ -565,6 +565,7 @@ Verify Quotas Display
Log All storage_usage_unit:${storage_usage_unit}
Log All storage_total_size:${storage_total_size}
Log All storage_quota_ret:${storage_quota_ret}
Should Match Regexp ${storage_quota_ret} ${storage_usage_without_unit}(\\\.\\d{1,2})*${storage_usage_unit} of ${storage_total_size}
${str_expected}= Replace String ${storage_usage_without_unit}(\\\.\\d{1,2})*${storage_usage_unit} of ${storage_total_size} B iB
Should Match Regexp ${storage_quota_ret} ${str_expected}
END
Close Browser

View File

@ -241,7 +241,7 @@ Test Case - Replication Of Push Images from Self To Harbor By Push Event
Create An New Project And Go Into Project project_dest${d}
Push Special Image To Project project${d} ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} ${image} tags=@{tags} size=${image_size}
# Use tag as identifier for this artifact
Image Should Be Replicated To Project project_dest${d} ${image} tag=${tag1} expected_image_size_in_regexp=4(\\\.\\d{1,2})*GB
Image Should Be Replicated To Project project_dest${d} ${image} tag=${tag1} expected_image_size_in_regexp=4(\\\.\\d{1,2})*GiB
Close Browser
Test Case - Replication Of Pull Images from AWS-ECR To Self