mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-09 17:37:44 +01:00
Merge pull request #4478 from wy65701436/add-readonly-tc
add read only case
This commit is contained in:
commit
14e24267c0
@ -211,10 +211,22 @@ Set Scan All To None
|
|||||||
click element //vulnerability-config//select/option[@value='none']
|
click element //vulnerability-config//select/option[@value='none']
|
||||||
sleep 1
|
sleep 1
|
||||||
click element ${config_save_button_xpath}
|
click element ${config_save_button_xpath}
|
||||||
|
|
||||||
Set Scan All To Daily
|
Set Scan All To Daily
|
||||||
click element //vulnerability-config//select
|
click element //vulnerability-config//select
|
||||||
click element //vulnerability-config//select/option[@value='daily']
|
click element //vulnerability-config//select/option[@value='daily']
|
||||||
sleep 1
|
sleep 1
|
||||||
click element ${config_save_button_xpath}
|
click element ${config_save_button_xpath}
|
||||||
|
|
||||||
Click Scan Now
|
Click Scan Now
|
||||||
click element //vulnerability-config//button[contains(.,'SCAN')]
|
click element //vulnerability-config//button[contains(.,'SCAN')]
|
||||||
|
|
||||||
|
Enable Read Only
|
||||||
|
${rc} ${output}= Run And Return Rc And Output curl -u admin:Harbor12345 -s --insecure -H "Content-Type: application/json" -X PUT -d '{"read_only":true}' "https://${ip}/api/configurations"
|
||||||
|
Log To Console ${output}
|
||||||
|
Should Be Equal As Integers ${rc} 0
|
||||||
|
|
||||||
|
Disable Read Only
|
||||||
|
${rc} ${output}= Run And Return Rc And Output curl -u admin:Harbor12345 -s --insecure -H "Content-Type: application/json" -X PUT -d '{"read_only":false}' "https://${ip}/api/configurations"
|
||||||
|
Log To Console ${output}
|
||||||
|
Should Be Equal As Integers ${rc} 0
|
@ -35,6 +35,18 @@ Test Case - Vulnerability Data Not Ready
|
|||||||
Go To Vulnerability Config
|
Go To Vulnerability Config
|
||||||
Vulnerability Not Ready Config Hint
|
Vulnerability Not Ready Config Hint
|
||||||
|
|
||||||
|
Test Case - Read Only Mode
|
||||||
|
Init Chrome Driver
|
||||||
|
${d}= Get Current Date result_format=%m%s
|
||||||
|
Create An New Project With New User url=${HARBOR_URL} username=tester${d} email=tester${d}@vmware.com realname=tester${d} newPassword=Test1@34 comment=harbor projectname=project${d} public=true
|
||||||
|
|
||||||
|
Enable Read Only
|
||||||
|
Cannot Push image ${ip} tester${d} Test1@34 project${d} busybox:latest
|
||||||
|
|
||||||
|
Disable Read Only
|
||||||
|
Push image ${ip} tester${d} Test1@34 project${d} busybox:latest
|
||||||
|
Close Browser
|
||||||
|
|
||||||
Test Case - Create An New User
|
Test Case - Create An New User
|
||||||
Init Chrome Driver
|
Init Chrome Driver
|
||||||
${d}= Get Current Date result_format=%m%s
|
${d}= Get Current Date result_format=%m%s
|
||||||
|
Loading…
Reference in New Issue
Block a user