mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-20 14:01:40 +01:00
add retry for make swagger client (#6813)
Signed-off-by: danfengliu <danfengl@vmware.com>
This commit is contained in:
parent
257eebfebe
commit
b0c1adab8d
@ -1,8 +1,12 @@
|
|||||||
*** Keywords ***
|
*** Keywords ***
|
||||||
Setup API Test
|
Make Swagger Client
|
||||||
${rc} ${output}= Run And Return Rc And Output make swagger_client
|
${rc} ${output}= Run And Return Rc And Output make swagger_client
|
||||||
Log ${output}
|
Log ${output}
|
||||||
Should Be Equal As Integers ${rc} 0
|
[Return] ${rc}
|
||||||
|
|
||||||
|
Setup API Test
|
||||||
|
Retry Keyword When Error Make Swagger Client
|
||||||
|
|
||||||
Harbor API Test
|
Harbor API Test
|
||||||
[Arguments] ${testcase_name}
|
[Arguments] ${testcase_name}
|
||||||
${current_dir}= Run pwd
|
${current_dir}= Run pwd
|
||||||
|
@ -78,3 +78,13 @@ Wait Unitl Vul Data Ready
|
|||||||
\ Exit For Loop If ${contains}
|
\ Exit For Loop If ${contains}
|
||||||
\ Sleep ${interval}
|
\ Sleep ${interval}
|
||||||
Run Keyword If ${i+1}==${n} Fail The vul data is not ready
|
Run Keyword If ${i+1}==${n} Fail The vul data is not ready
|
||||||
|
|
||||||
|
Retry Keyword When Error
|
||||||
|
[Arguments] ${keyword} ${times}=6
|
||||||
|
:For ${n} IN RANGE 1 ${times}
|
||||||
|
\ Log To Console Attampt to ${keyword} ${n} times ...
|
||||||
|
\ ${out} Run Keyword And Ignore Error ${keyword}
|
||||||
|
\ Log To Console Return value is ${out}
|
||||||
|
\ Exit For Loop If '${out[0]}'=='PASS'
|
||||||
|
\ Sleep 3
|
||||||
|
Should Be Equal As Strings '${out[0]}' 'PASS'
|
Loading…
Reference in New Issue
Block a user