mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-08 07:51:25 +01:00
Update testcase in main branch (#21375)
Update robot account e2e testcase for export-cve change update job service schedule testcase switch dockerhub to registry.goharbor.io Signed-off-by: stonezdj <stone.zhang@broadcom.com>
This commit is contained in:
parent
b0c74a0584
commit
6001359038
@ -81,8 +81,8 @@ list_project = Permission("{}/projects".format(harbor_base_url), "GET", 200, pro
|
||||
registry_payload = {
|
||||
"insecure": False,
|
||||
"name": "registry-{}".format(random.randint(1000, 9999)),
|
||||
"type": "docker-hub",
|
||||
"url": "https://hub.docker.com"
|
||||
"type": "harbor",
|
||||
"url": "https://registry.goharbor.io"
|
||||
}
|
||||
create_registry = Permission("{}/registries".format(harbor_base_url), "POST", 201, registry_payload, "id", id_from_header=True)
|
||||
list_registry = Permission("{}/registries".format(harbor_base_url), "GET", 200, registry_payload)
|
||||
@ -93,8 +93,8 @@ delete_registry = Permission("{}/registries/{}".format(harbor_base_url, ID_PLACE
|
||||
registry_ping_payload = {
|
||||
"insecure": False,
|
||||
"name": "registry-{}".format(random.randint(1000, 9999)),
|
||||
"type": "docker-hub",
|
||||
"url": "https://hub.docker.com"
|
||||
"type": "harbor",
|
||||
"url": "https://registry.goharbor.io"
|
||||
}
|
||||
ping_registry = Permission("{}/registries/ping".format(harbor_base_url), "POST", 200, registry_ping_payload)
|
||||
# registry permissions end
|
||||
|
@ -24,8 +24,8 @@ Create A Project Robot Account
|
||||
${permission_count}= Create Dictionary
|
||||
${total}= Set Variable 0
|
||||
IF '${first_resource}' == 'all'
|
||||
Set To Dictionary ${permission_count} all= 68
|
||||
${total}= Set Variable 68
|
||||
Set To Dictionary ${permission_count} all= 70
|
||||
${total}= Set Variable 70
|
||||
Retry Element Click //span[text()='Select all']
|
||||
ELSE
|
||||
FOR ${item} IN @{resources}
|
||||
|
@ -676,9 +676,9 @@ Create Schedules For Job Service Dashboard Schedules
|
||||
Create An New P2P Preheat Policy ${p2p_policy_name} ${distribution_name} ** ** Scheduled ${schedule_type} ${schedule_cron}
|
||||
# Create a replication policy triggered by schedule
|
||||
Switch to Registries
|
||||
Create A New Endpoint docker-hub docker-hub${d} ${null} ${null} ${null} Y
|
||||
Create A New Endpoint harbor goharbor${d} ${null} ${null} ${null} Y
|
||||
Switch To Replication Manage
|
||||
Create A Rule With Existing Endpoint ${replication_policy_name} pull goharbor/harbor-core image docker-hub${d} ${project_name} filter_tag=dev mode=Scheduled cron=${schedule_cron}
|
||||
Create A Rule With Existing Endpoint ${replication_policy_name} pull harbor-ci/goharbor/harbor-core image goharbor${d} ${project_name} filter_tag=dev mode=Scheduled cron=${schedule_cron}
|
||||
# Set up a schedule to scan all
|
||||
Switch To Vulnerability Page
|
||||
Set Scan Schedule Custom value=${schedule_cron}
|
||||
|
@ -723,7 +723,7 @@ Test Case - System Robot Account Cover All Projects
|
||||
Pull image ${ip} '${robot_account_name}' ${token} project${d} hello-world:latest
|
||||
Retry Action Keyword Check System Robot Account API Permission ${robot_account_name} ${token} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} all
|
||||
Retry Action Keyword Check Project Robot Account API Permission ${robot_account_name} ${token} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} ${project_id} ${project_name} hello-world latest all
|
||||
Retry Wait Element Visible //clr-dg-row[.//clr-dg-cell[contains(.,'${robot_account_name}')] and .//clr-icon[contains(@class, 'color-green')] and .//button[text()=' 72 PERMISSION(S) '] and .//span[contains(.,'Never Expires')] and .//clr-dg-cell[text()='For testing'] ]
|
||||
Retry Wait Element Visible //clr-dg-row[.//clr-dg-cell[contains(.,'${robot_account_name}')] and .//clr-icon[contains(@class, 'color-green')] and .//button[text()=' 70 PERMISSION(S) '] and .//span[contains(.,'Never Expires')] and .//clr-dg-cell[text()='For testing'] ]
|
||||
System Robot Account Exist ${robot_account_name} all
|
||||
Close Browser
|
||||
|
||||
@ -739,13 +739,13 @@ Test Case - System Robot Account
|
||||
${project_id}= Set Variable ${words}[-2]
|
||||
Switch To Robot Account
|
||||
${robot_account_name} ${token}= Create A System Robot Account sys1${d} days days=100 description=For testing cover_all_system_resources=${true}
|
||||
Retry Wait Element Visible //clr-dg-row[.//clr-dg-cell[contains(.,'${robot_account_name}')] and .//clr-icon[contains(@class, 'color-green')] and .//button[text()=' 72 PERMISSION(S) '] and .//span[contains(.,'99d 23h')] and .//clr-dg-cell[text()='For testing'] and .//clr-dg-cell//span[text()=' None ']]
|
||||
Retry Wait Element Visible //clr-dg-row[.//clr-dg-cell[contains(.,'${robot_account_name}')] and .//clr-icon[contains(@class, 'color-green')] and .//button[text()=' 70 PERMISSION(S) '] and .//span[contains(.,'99d 23h')] and .//clr-dg-cell[text()='For testing'] and .//clr-dg-cell//span[text()=' None ']]
|
||||
Retry Action Keyword Check System Robot Account API Permission ${robot_account_name} ${token} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} all
|
||||
Retry Action Keyword Check Project Robot Account API Permission ${robot_account_name} ${token} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} ${project_id} ${project_name} hello-world latest all 1
|
||||
|
||||
${robot_account_name} ${token}= Create A System Robot Account sys2${d} days days=2 description=For testing cover_all_project_resources=${true}
|
||||
Push image ${ip} '${robot_account_name}' ${token} project${d} hello-world:latest
|
||||
Retry Wait Element Visible //clr-dg-row[.//clr-dg-cell[contains(.,'${robot_account_name}')] and .//clr-icon[contains(@class, 'color-green')] and .//span[text()='All projects with'] and .//button[text()=' 68 PERMISSION(S) '] and .//span[contains(.,'1d 23h')] and .//clr-dg-cell[text()='For testing'] and .//clr-dg-cell//span[text()=' None ']]
|
||||
Retry Wait Element Visible //clr-dg-row[.//clr-dg-cell[contains(.,'${robot_account_name}')] and .//clr-icon[contains(@class, 'color-green')] and .//span[text()='All projects with'] and .//button[text()=' 70 PERMISSION(S) '] and .//span[contains(.,'1d 23h')] and .//clr-dg-cell[text()='For testing'] and .//clr-dg-cell//span[text()=' None ']]
|
||||
Retry Action Keyword Check System Robot Account API Permission ${robot_account_name} ${token} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} all 1
|
||||
Retry Action Keyword Check Project Robot Account API Permission ${robot_account_name} ${token} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} ${project_id} ${project_name} hello-world latest all
|
||||
Close Browser
|
||||
|
Loading…
Reference in New Issue
Block a user