Update the ping registry endpoint to harbor in check permission script (#21393)

Signed-off-by: stonezdj <stone.zhang@broadcom.com>
This commit is contained in:
stonezdj(Daojun Zhang) 2025-01-09 12:48:37 +08:00 committed by GitHub
parent 4f65b4a642
commit c92d4cfe2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -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