1.Add CVE white list API test into API_DB.robot;2.Random data for prject name should use lower case %m%s;3.Replace from harbor to self.

Signed-off-by: danfengliu <danfengl@vmware.com>
This commit is contained in:
danfengliu 2019-09-04 13:52:56 +08:00
parent 697ec2a52f
commit 8503957eac
5 changed files with 23 additions and 18 deletions

View File

@ -27,6 +27,8 @@ Verify Project
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
:FOR ${project} IN @{project} :FOR ${project} IN @{project}
\ Page Should Contain ${project} \ Page Should Contain ${project}
#TO_DO:
#Verify project metadata.
Close Browser Close Browser
Verify Image Tag Verify Image Tag

View File

@ -49,3 +49,7 @@ Test Case - Robot Account
Harbor API Test ./tests/apitests/python/test_robot_account.py Harbor API Test ./tests/apitests/python/test_robot_account.py
Test Case - Sign A Image Test Case - Sign A Image
Harbor API Test ./tests/apitests/python/test_sign_image.py Harbor API Test ./tests/apitests/python/test_sign_image.py
Test Case - System Level CVE Whitelist
Harbor API Test ./tests/apitests/python/test_sys_cve_whitelists.py
#Test Case - Project Level CVE Whitelist
# Harbor API Test ./tests/apitests/python/test_project_level_cve_whitelist.py

View File

@ -49,7 +49,6 @@ Test Case - Scan A Tag In The Repo
Test Case - Scan As An Unprivileged User Test Case - Scan As An Unprivileged User
Init Chrome Driver Init Chrome Driver
${d}= get current date result_format=%m%s
Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} library hello-world Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} library hello-world
Sign In Harbor ${HARBOR_URL} user024 Test1@34 Sign In Harbor ${HARBOR_URL} user024 Test1@34
@ -148,7 +147,7 @@ Test Case - Project Level Image Serverity Policy
Test Case - Verfiy System Level CVE Whitelist Test Case - Verfiy System Level CVE Whitelist
[Tags] run-once [Tags] run-once
Init Chrome Driver Init Chrome Driver
${d}= Get Current Date result_format=%m%S ${d}= Get Current Date result_format=%m%s
${image}= Set Variable postgres ${image}= Set Variable postgres
${sha256}= Set Variable 68b49a280d2fbe9330c0031970ebb72015e1272dfa25f0ed7557514f9e5ad7b7 ${sha256}= Set Variable 68b49a280d2fbe9330c0031970ebb72015e1272dfa25f0ed7557514f9e5ad7b7
${signin_user}= Set Variable user025 ${signin_user}= Set Variable user025
@ -177,7 +176,7 @@ Test Case - Verfiy System Level CVE Whitelist
Test Case - Verfiy Project Level CVE Whitelist Test Case - Verfiy Project Level CVE Whitelist
[Tags] run-once [Tags] run-once
Init Chrome Driver Init Chrome Driver
${d}= Get Current Date result_format=%m%S ${d}= Get Current Date result_format=%m%s
${image}= Set Variable redis ${image}= Set Variable redis
${sha256}= Set Variable 9755880356c4ced4ff7745bafe620f0b63dd17747caedba72504ef7bac882089 ${sha256}= Set Variable 9755880356c4ced4ff7745bafe620f0b63dd17747caedba72504ef7bac882089
${signin_user}= Set Variable user025 ${signin_user}= Set Variable user025
@ -204,7 +203,7 @@ Test Case - Verfiy Project Level CVE Whitelist
Test Case - Verfiy Project Level CVE Whitelist By Quick Way of Add System Test Case - Verfiy Project Level CVE Whitelist By Quick Way of Add System
[Tags] run-once [Tags] run-once
Init Chrome Driver Init Chrome Driver
${d}= Get Current Date result_format=%m%S ${d}= Get Current Date result_format=%m%s
#Image for test: haproxy:1.5 #Image for test: haproxy:1.5
${image}= Set Variable haproxy ${image}= Set Variable haproxy
${sha256}= Set Variable eca4db0f144d40554e97d000a414a0535720e5d6e559731860558676a57529f8 ${sha256}= Set Variable eca4db0f144d40554e97d000a414a0535720e5d6e559731860558676a57529f8

View File

@ -50,7 +50,7 @@ Test Case - OIDC User Sign In
Test Case - Create An New Project Test Case - Create An New Project
Sign In Harbor With OIDC User ${HARBOR_URL} Sign In Harbor With OIDC User ${HARBOR_URL}
${d}= Get Current Date result_format=%M%S ${d}= Get Current Date result_format=%m%s
Create An New Project test${d} Create An New Project test${d}
Close Browser Close Browser

View File

@ -45,7 +45,7 @@ Test Case - Pro Replication Rules Add
Test Case - Harbor Endpoint Verification Test Case - Harbor Endpoint Verification
#This case need vailid info and selfsign cert #This case need vailid info and selfsign cert
Init Chrome Driver Init Chrome Driver
${d}= Get Current Date result_format=%M%S ${d}= Get Current Date result_format=%m%s
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Switch To Registries Switch To Registries
Create A New Endpoint harbor edp1${d} https://${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} N Create A New Endpoint harbor edp1${d} https://${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} N
@ -57,7 +57,7 @@ Test Case - Harbor Endpoint Verification
Test Case - DockerHub Endpoint Add Test Case - DockerHub Endpoint Add
#This case need vailid info and selfsign cert #This case need vailid info and selfsign cert
Init Chrome Driver Init Chrome Driver
${d}= Get Current Date result_format=%M%S ${d}= Get Current Date result_format=%m%s
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Switch To Registries Switch To Registries
Create A New Endpoint docker-hub edp1${d} https://hub.docker.com/ danfengliu Aa123456 Y Create A New Endpoint docker-hub edp1${d} https://hub.docker.com/ danfengliu Aa123456 Y
@ -66,7 +66,7 @@ Test Case - DockerHub Endpoint Add
Test Case - Harbor Endpoint Add Test Case - Harbor Endpoint Add
#This case need vailid info and selfsign cert #This case need vailid info and selfsign cert
Init Chrome Driver Init Chrome Driver
${d}= Get Current Date result_format=%M%S ${d}= Get Current Date result_format=%m%s
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Switch To Registries Switch To Registries
Create A New Endpoint harbor testabc https://${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Y Create A New Endpoint harbor testabc https://${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Y
@ -92,7 +92,7 @@ Test Case - Harbor Endpoint Delete
Test Case - Replication Rule Edit Test Case - Replication Rule Edit
Init Chrome Driver Init Chrome Driver
${d}= Get Current Date result_format=%M%S ${d}= Get Current Date result_format=%m%s
${endpoint1}= Set Variable e1${d} ${endpoint1}= Set Variable e1${d}
${endpoint2}= Set Variable e2${d} ${endpoint2}= Set Variable e2${d}
${rule_name_old}= Set Variable rule_testabc${d} ${rule_name_old}= Set Variable rule_testabc${d}
@ -134,7 +134,7 @@ Test Case - Replication Rule Edit
Test Case - Replication Rule Delete Test Case - Replication Rule Delete
Init Chrome Driver Init Chrome Driver
${d}= Get Current Date result_format=%M%S ${d}= Get Current Date result_format=%m%s
${endpoint1}= Set Variable e1${d} ${endpoint1}= Set Variable e1${d}
${rule_name}= Set Variable rule_testabc${d} ${rule_name}= Set Variable rule_testabc${d}
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
@ -147,7 +147,7 @@ Test Case - Replication Rule Delete
Test Case - Replication Of Pull Images from DockerHub To Self Test Case - Replication Of Pull Images from DockerHub To Self
Init Chrome Driver Init Chrome Driver
${d}= Get Current Date result_format=%M%S ${d}= Get Current Date result_format=%m%s
#login source #login source
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Create An New Project project${d} Create An New Project project${d}
@ -168,7 +168,7 @@ Test Case - Replication Of Pull Images from DockerHub To Self
Test Case - Replication Of Push Images from Self To Harbor Test Case - Replication Of Push Images from Self To Harbor
Init Chrome Driver Init Chrome Driver
${d}= Get Current Date result_format=%M%S ${d}= Get Current Date result_format=%m%s
#login source #login source
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Create An New Project project${d} Create An New Project project${d}
@ -199,7 +199,7 @@ Test Case - Replication Of Push Images from Self To Harbor
Test Case - Replication Of Push Chart from Self To Harbor Test Case - Replication Of Push Chart from Self To Harbor
Init Chrome Driver Init Chrome Driver
${d}= Get Current Date result_format=%M%S ${d}= Get Current Date result_format=%m%s
#login source #login source
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Create An New Project project${d} Create An New Project project${d}
@ -231,7 +231,7 @@ Test Case - Replication Of Push Chart from Self To Harbor
Test Case - Replication Of Push Images from Self To Harbor By Push Event Test Case - Replication Of Push Images from Self To Harbor By Push Event
Init Chrome Driver Init Chrome Driver
${d}= Get Current Date result_format=%M%S ${d}= Get Current Date result_format=%m%s
#login source #login source
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Create An New Project project${d} Create An New Project project${d}
@ -251,9 +251,9 @@ Test Case - Replication Of Push Images from Self To Harbor By Push Event
Retry Wait Until Page Contains project_dest${d}/centos Retry Wait Until Page Contains project_dest${d}/centos
Close Browser Close Browser
Test Case - Replication Of Pull Images from AWS-ECR To Harbor Test Case - Replication Of Pull Images from AWS-ECR To Self
Init Chrome Driver Init Chrome Driver
${d}= Get Current Date result_format=%M%S ${d}= Get Current Date result_format=%m%s
#login source #login source
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Create An New Project project${d} Create An New Project project${d}
@ -272,9 +272,9 @@ Test Case - Replication Of Pull Images from AWS-ECR To Harbor
Retry Wait Until Page Contains project${d}/tomcat Retry Wait Until Page Contains project${d}/tomcat
Close Browser Close Browser
Test Case - Replication Of Pull Images from Google-GCR To Harbor Test Case - Replication Of Pull Images from Google-GCR To Self
Init Chrome Driver Init Chrome Driver
${d}= Get Current Date result_format=%M%S ${d}= Get Current Date result_format=%m%s
#login source #login source
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Create An New Project project${d} Create An New Project project${d}