mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-03 14:37:44 +01:00
Merge pull request #6205 from ywk253100/181102_case
Check the vul data before running scan-on-push case
This commit is contained in:
commit
8c376ac55a
@ -58,3 +58,16 @@ Resource Cert-Util.robot
|
||||
Resource SeleniumUtil.robot
|
||||
Resource Nightly-Util.robot
|
||||
Resource APITest-Util.robot
|
||||
|
||||
*** Keywords ***
|
||||
Wait Unitl Vul Data Ready
|
||||
[Arguments] ${url} ${timeout} ${interval}
|
||||
${n}= Evaluate ${timeout}/${interval}
|
||||
:FOR ${i} IN RANGE ${n}
|
||||
\ Log Checking the vul data: ${i} ... console=True
|
||||
\ ${rc} ${output}= Run And Return Rc And Output curl -k ${url}/api/systeminfo
|
||||
\ Should Be Equal As Integers ${rc} 0
|
||||
\ ${contains}= Run Keyword And Return Status Should Contain ${output} overall_last_update
|
||||
\ Exit For Loop If ${contains}
|
||||
\ Sleep ${interval}
|
||||
Run Keyword If ${i+1}==${n} Fail The vul data is not ready
|
||||
|
@ -593,19 +593,6 @@ Test Case - Manual Scan All
|
||||
Summary Chart Should Display latest
|
||||
Close Browser
|
||||
|
||||
Test Case - Scan Image On Push
|
||||
Init Chrome Driver
|
||||
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
||||
Go Into Project library
|
||||
Goto Project Config
|
||||
Enable Scan On Push
|
||||
Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} library memcached
|
||||
Back To Projects
|
||||
Go Into Project library
|
||||
Go Into Repo memcached
|
||||
Summary Chart Should Display latest
|
||||
Close Browser
|
||||
|
||||
Test Case - View Scan Results
|
||||
Init Chrome Driver
|
||||
${d}= get current date result_format=%m%s
|
||||
@ -695,3 +682,17 @@ Test Case - Admin Push Signed Image
|
||||
Log To Console ${output}
|
||||
Should Be Equal As Integers ${rc} 0
|
||||
Should Contain ${output} sha256
|
||||
|
||||
Test Case - Admin Push Signed Image
|
||||
Wait Unitl Vul Data Ready ${HARBOR_URL} 7200 30
|
||||
Init Chrome Driver
|
||||
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
||||
Go Into Project library
|
||||
Goto Project Config
|
||||
Enable Scan On Push
|
||||
Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} library memcached
|
||||
Back To Projects
|
||||
Go Into Project library
|
||||
Go Into Repo memcached
|
||||
Summary Chart Should Display latest
|
||||
Close Browser
|
Loading…
Reference in New Issue
Block a user