mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-15 23:05:57 +01:00
Add retry to project quota GC test case (#17164)
Add retry to improve test case stability Signed-off-by: Yang Jiao <jiaoya@vmware.com>
This commit is contained in:
parent
ef8b8f0be7
commit
8d397d5a07
@ -83,9 +83,14 @@ Test Case - Project Quotas Control Under GC
|
|||||||
GC Now
|
GC Now
|
||||||
Create An New Project And Go Into Project project${d} storage_quota=${storage_quota} storage_quota_unit=${storage_quota_unit}
|
Create An New Project And Go Into Project project${d} storage_quota=${storage_quota} storage_quota_unit=${storage_quota_unit}
|
||||||
Cannot Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${image_a}:${image_a_ver} err_msg=will exceed the configured upper limit of 200.0 MiB
|
Cannot Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${image_a}:${image_a_ver} err_msg=will exceed the configured upper limit of 200.0 MiB
|
||||||
GC Now
|
|
||||||
${latest_job_id}= Get Text ${latest_job_id_xpath}
|
|
||||||
Retry GC Should Be Successful ${latest_job_id} ${null}
|
|
||||||
@{param} Create List project${d}
|
@{param} Create List project${d}
|
||||||
Retry Keyword When Return Value Mismatch Get Project Storage Quota Text From Project Quotas List 0Byte of ${storage_quota}${storage_quota_unit} 60 @{param}
|
FOR ${n} IN RANGE 1 3
|
||||||
|
${out1} Run Keyword And Ignore Error GC Now
|
||||||
|
${latest_job_id}= Get Text ${latest_job_id_xpath}
|
||||||
|
Retry GC Should Be Successful ${latest_job_id} ${null}
|
||||||
|
${out2} Run Keyword And Ignore Error Retry Keyword When Return Value Mismatch Get Project Storage Quota Text From Project Quotas List 0Byte of ${storage_quota}${storage_quota_unit} 2 @{param}
|
||||||
|
Exit For Loop If '${out2[0]}'=='PASS'
|
||||||
|
Sleep 1
|
||||||
|
END
|
||||||
|
Should Be Equal As Strings '${out2[0]}' 'PASS'
|
||||||
Close Browser
|
Close Browser
|
Loading…
Reference in New Issue
Block a user