Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cherry-pick]Add notation pull policy test case #19626

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/resources/Harbor-Pages/Project-Config.robot
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Click Cosign Deployment Security
Mouse Down //input[@id='content-trust-cosign']
Mouse Up //input[@id='content-trust-cosign']

Click Notation Deployment Security
Mouse Down //input[@id='content-trust']
Mouse Up //input[@id='content-trust']

Click Prevent Running
Mouse Down //hbr-project-policy-config//input[@name='prevent-vulnerability-image']
Mouse Up //hbr-project-policy-config//input[@name='prevent-vulnerability-image']
Expand Down Expand Up @@ -45,6 +49,9 @@ Project Should Be Public
Content Cosign Deployment security Be Selected
Checkbox Should Be Selected //input[@id='content-trust-cosign']

Content Notation Deployment security Be Selected
Checkbox Should Be Selected //input[@id='content-trust']

Prevent Running Should Be Selected
Checkbox Should Be Selected //hbr-project-policy-config//input[@name='prevent-vulnerability-image']

Expand Down
29 changes: 29 additions & 0 deletions tests/robot-cases/Group1-Nightly/Common.robot
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,35 @@ Test Case - Cosign And Cosign Deployment Security Policy
Retry Double Keywords When Error Delete Accessory ${tag} Should be Accessory deleted ${tag}
Close Browser

Test Case - Notation And Notation Deployment Security Policy
[Tags] notation
Init Chrome Driver
${user}= Set Variable user007
${pwd}= Set Variable Test1@34
${d}= Get Current Date result_format=%m%s
${image}= Set Variable hello-world
${tag}= Set Variable latest
Sign In Harbor ${HARBOR_URL} ${user} ${pwd}
Create An New Project And Go Into Project project${d}
Goto Project Config
Click Notation Deployment Security
Save Project Config
Content Notation Deployment security Be Selected

Push Image With Tag ${ip} ${user} ${pwd} project${d} ${image} ${tag}
Go Into Project project${d}
Go Into Repo project${d} ${image}
Should Not Be Signed ${tag}
Cannot Pull Image ${ip} ${user} ${pwd} project${d} ${image}:${tag} err_msg=The image is not signed by notation.

Notation Generate Cert
Notation Sign ${ip}/project${d}/${image}:${tag}

Retry Double Keywords When Error Retry Element Click ${artifact_list_refresh_btn} Should Be Signed ${tag}
Pull image ${ip} ${user} ${pwd} project${d} ${image}:${tag}
Retry Double Keywords When Error Delete Accessory ${tag} Should be Accessory deleted ${tag}
Close Browser

Test Case - Audit Log And Purge
[Tags] audit_log_and_purge
Init Chrome Driver
Expand Down
Loading