2018-09-19 11:49:43 +02:00
|
|
|
*** Settings ***
|
|
|
|
Documentation Harbor BATs
|
|
|
|
Resource ../../resources/APITest-Util.robot
|
|
|
|
Resource ../../resources/Docker-Util.robot
|
|
|
|
Library OperatingSystem
|
|
|
|
Library String
|
|
|
|
Library Collections
|
|
|
|
Library requests
|
|
|
|
Library Process
|
|
|
|
Default Tags APIDB
|
|
|
|
|
|
|
|
*** Variables ***
|
|
|
|
${SERVER} ${ip}
|
|
|
|
${SERVER_URL} https://${SERVER}
|
|
|
|
${SERVER_API_ENDPOINT} ${SERVER_URL}/api
|
|
|
|
&{SERVER_CONFIG} endpoint=${SERVER_API_ENDPOINT} verify_ssl=False
|
|
|
|
|
|
|
|
*** Test Cases ***
|
2020-03-11 04:19:29 +01:00
|
|
|
Test Case - Garbage Collection
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] gc
|
2020-03-11 04:19:29 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_garbage_collection.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2018-10-31 06:13:31 +01:00
|
|
|
Test Case - Add Private Project Member and Check User Can See It
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] private_member
|
2018-11-01 11:26:04 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_add_member_to_private_project.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-02-21 10:08:27 +01:00
|
|
|
Test Case - Delete a Repository of a Certain Project Created by Normal User
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] del_repo
|
2020-02-21 10:08:27 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_del_repo.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-02-25 03:40:29 +01:00
|
|
|
Test Case - Add a System Global Label to a Certain Tag
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] global_lbl
|
2020-02-25 03:40:29 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_add_sys_label_to_tag.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-02-02 06:04:13 +01:00
|
|
|
Test Case - Add Replication Rule
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] replic_rule
|
2020-02-02 06:04:13 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_add_replication_rule.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2018-11-14 09:23:44 +01:00
|
|
|
Test Case - Edit Project Creation
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] pro_creation
|
2018-11-14 09:23:44 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_edit_project_creation.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-02-25 03:40:29 +01:00
|
|
|
Test Case - Manage Project Member
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] member
|
2020-02-25 03:40:29 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_manage_project_member.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-03-19 07:56:37 +01:00
|
|
|
Test Case - User View Logs
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] view_logs
|
2020-03-19 07:56:37 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_user_view_logs.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-02-25 03:40:29 +01:00
|
|
|
Test Case - Assign Sys Admin
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] assign_adin
|
2020-02-25 03:40:29 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_assign_sys_admin.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-02-21 10:08:27 +01:00
|
|
|
Test Case - Copy Artifact Outside Project
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] copy_artifact
|
2020-02-21 10:08:27 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_copy_artifact_outside_project.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-02-25 03:40:29 +01:00
|
|
|
Test Case - Robot Account
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] robot_account
|
2020-02-25 03:40:29 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_robot_account.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-03-12 04:50:30 +01:00
|
|
|
Test Case - Project Quota
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] quota
|
|
|
|
Harbor API Test ./tests/apitests/python/test_project_quota.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-06-22 04:34:03 +02:00
|
|
|
Test Case - System Level CVE Allowlist
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] sys_cve
|
2020-06-22 04:34:03 +02:00
|
|
|
Harbor API Test ./tests/apitests/python/test_sys_cve_allowlists.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-06-22 04:34:03 +02:00
|
|
|
Test Case - Project Level CVE Allowlist
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] pro_cve
|
2020-06-22 04:34:03 +02:00
|
|
|
Harbor API Test ./tests/apitests/python/test_project_level_cve_allowlist.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-02-25 03:40:29 +01:00
|
|
|
Test Case - Tag Retention
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] tag_retention
|
2020-02-25 03:40:29 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_retention.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-02-25 03:40:29 +01:00
|
|
|
Test Case - Health Check
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] health
|
2020-02-25 03:40:29 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_health_check.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-03-01 10:57:40 +01:00
|
|
|
Test Case - Push Index By Docker Manifest
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] push_index
|
2020-03-01 10:57:40 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_push_index_by_docker_manifest.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2023-05-29 05:55:14 +02:00
|
|
|
Test Case - Push Chart By Helm Chart CLI
|
|
|
|
[Tags] push_chart_by_helm
|
|
|
|
Harbor API Test ./tests/apitests/python/test_push_chart_by_helm_chart_cli.py
|
2021-10-26 09:49:09 +02:00
|
|
|
|
2020-03-07 04:15:19 +01:00
|
|
|
Test Case - Push Cnab Bundle
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] push_cnab
|
2020-03-07 04:15:19 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_push_cnab_bundle.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-11-03 08:32:13 +01:00
|
|
|
Test Case - Tag CRUD
|
|
|
|
[Tags] tag_crud
|
|
|
|
Harbor API Test ./tests/apitests/python/test_tag_crud.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-03-26 10:07:58 +01:00
|
|
|
Test Case - Scan Image
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] scan
|
2020-03-26 10:07:58 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_scan_image_artifact.py
|
2020-08-17 11:55:38 +02:00
|
|
|
|
|
|
|
Test Case - Scan Image In Public Project
|
2020-11-03 08:32:13 +01:00
|
|
|
[Tags] scan_public_project
|
2020-08-17 11:55:38 +02:00
|
|
|
Harbor API Test ./tests/apitests/python/test_scan_image_artifact_in_public_project.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-03-26 10:07:58 +01:00
|
|
|
Test Case - Scan All Images
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] scan_all
|
2020-03-26 10:07:58 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_system_level_scan_all.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2021-10-18 07:13:53 +02:00
|
|
|
Test Case - Stop Scan Image
|
|
|
|
[Tags] stop_scan
|
|
|
|
Harbor API Test ./tests/apitests/python/test_stop_scan_image_artifact.py
|
|
|
|
|
|
|
|
Test Case - Stop Scan All Images
|
|
|
|
[Tags] stop_scan_all
|
|
|
|
Harbor API Test ./tests/apitests/python/test_system_level_stop_scan_all.py
|
|
|
|
|
2020-04-07 11:28:09 +02:00
|
|
|
Test Case - Registry API
|
2020-04-20 11:16:02 +02:00
|
|
|
[Tags] reg_api
|
2020-04-07 11:28:09 +02:00
|
|
|
Harbor API Test ./tests/apitests/python/test_registry_api.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-04-22 10:44:10 +02:00
|
|
|
Test Case - Push Image With Special Name
|
|
|
|
[Tags] special_repo_name
|
|
|
|
Harbor API Test ./tests/apitests/python/test_push_image_with_special_name.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-06-04 12:17:26 +02:00
|
|
|
Test Case - Push Artifact With ORAS CLI
|
|
|
|
[Tags] oras
|
2020-06-09 09:33:18 +02:00
|
|
|
Harbor API Test ./tests/apitests/python/test_push_files_by_oras.py
|
2020-06-16 11:34:30 +02:00
|
|
|
|
2020-06-30 09:56:35 +02:00
|
|
|
Test Case - Replication From Dockerhub
|
|
|
|
[Tags] replic_dockerhub
|
|
|
|
Harbor API Test ./tests/apitests/python/test_replication_from_dockerhub.py
|
2020-10-22 03:55:38 +02:00
|
|
|
|
|
|
|
Test Case - Proxy Cache
|
|
|
|
[Tags] proxy_cache
|
|
|
|
Harbor API Test ./tests/apitests/python/test_proxy_cache.py
|
2020-11-03 08:32:13 +01:00
|
|
|
|
|
|
|
Test Case - Tag Immutability
|
|
|
|
[Tags] tag_immutability
|
|
|
|
Harbor API Test ./tests/apitests/python/test_tag_immutability.py
|
2020-10-27 10:31:48 +01:00
|
|
|
|
|
|
|
Test Case - P2P
|
|
|
|
[Tags] p2p
|
|
|
|
Harbor API Test ./tests/apitests/python/test_p2p.py
|
2021-01-07 11:34:01 +01:00
|
|
|
|
|
|
|
Test Case - Metrics
|
|
|
|
[Tags] metrics
|
|
|
|
Harbor API Test ./tests/apitests/python/test_verify_metrics_enabled.py
|
Upgrade docker and containerd
1. Fix E2E quotas issue, push the same image but with different name;
2. Add checkpoint for robot account test;
3. Upgraded docker and containerd in E2E image;
4. Package base image sample(busybox) into E2E image, so in E2E
container, all local docker images can be cleaned up, once base image is needed for
building image, it can be loaded locally;
5. Adapt OIDC service of supporting LDAP user, and add OIDC group user
test;
6. Restart docker deamon before content trust test, both in API and UI
test;
7. Add retry for keyword "Add A Tag Immutability Rule";
8. Fix tag retention test issue, missing click angle icon, and enhance
checkpoint of dry run and real run;
9. Fix schedule test issue for wrong cron string;
10. Disable quotas verification, it's not stable for script defect;
Signed-off-by: danfengliu <danfengl@vmware.com>
2021-01-29 08:52:21 +01:00
|
|
|
|
|
|
|
Test Case - Project Level Policy Content Trust
|
|
|
|
[Tags] content_trust
|
2021-05-21 05:46:32 +02:00
|
|
|
Harbor API Test ./tests/apitests/python/test_project_level_policy_content_trust.py
|
|
|
|
|
|
|
|
Test Case - Webhook CRUD
|
|
|
|
[Tags] webhook
|
2022-01-19 11:26:09 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_webhook_crud.py
|
|
|
|
|
|
|
|
Test Case - Cosign Sign Artifact
|
|
|
|
[Tags] cosign
|
2022-08-01 10:52:57 +02:00
|
|
|
Harbor API Test ./tests/apitests/python/test_cosign_sign_artifact.py
|
|
|
|
|
2023-11-07 09:39:37 +01:00
|
|
|
Test Case - Notation Sign Artifact
|
|
|
|
[Tags] notation
|
|
|
|
Harbor API Test ./tests/apitests/python/test_notation_sign_artifact.py
|
|
|
|
|
2022-08-01 10:52:57 +02:00
|
|
|
Test Case - Log Rotation
|
|
|
|
[Tags] log_rotation
|
2022-09-27 04:45:08 +02:00
|
|
|
Harbor API Test ./tests/apitests/python/test_log_rotation.py
|
|
|
|
|
|
|
|
Test Case - Log Forward
|
|
|
|
[Tags] log_forward
|
2022-11-18 11:03:46 +01:00
|
|
|
${SYSLOG_ENDPOINT_VALUE}= Get Variable Value ${SYSLOG_ENDPOINT} ${EMPTY}
|
|
|
|
${ES_ENDPOINT_VALUE}= Get Variable Value ${ES_ENDPOINT} ${EMPTY}
|
|
|
|
Skip If '${SYSLOG_ENDPOINT_VALUE}' == '${EMPTY}' or '${ES_ENDPOINT_VALUE}' == '${EMPTY}'
|
|
|
|
Harbor API Test ./tests/apitests/python/test_audit_log_forward.py SYSLOG_ENDPOINT=${SYSLOG_ENDPOINT_VALUE} ES_ENDPOINT=${ES_ENDPOINT_VALUE}
|
2022-10-17 07:25:03 +02:00
|
|
|
|
|
|
|
Test Case - Scan Data Export
|
|
|
|
[Tags] scan_data_export
|
2023-02-17 07:56:13 +01:00
|
|
|
Harbor API Test ./tests/apitests/python/test_scan_data_export.py
|
|
|
|
|
|
|
|
Test Case - Job Service Dashboard
|
|
|
|
[Tags] job_service_dashboard
|
|
|
|
Harbor API Test ./tests/apitests/python/test_job_service_dashboard.py
|
2023-05-19 08:18:21 +02:00
|
|
|
|
|
|
|
Test Case - Retain Image Last Pull Time
|
|
|
|
[Tags] retain_image_last_pull_time
|
|
|
|
Harbor API Test ./tests/apitests/python/test_retain_image_last_pull_time.py
|
2023-06-01 10:34:40 +02:00
|
|
|
|
|
|
|
Test Case - Referrers API
|
|
|
|
[Tags] referrers
|
|
|
|
Harbor API Test ./tests/apitests/python/test_referrers_api.py
|
2023-06-06 04:45:28 +02:00
|
|
|
|
|
|
|
Test Case - Podman Pull And Push To Harbor
|
|
|
|
[Tags] podman_pull_push
|
|
|
|
Harbor API Test ./tests/apitests/python/test_podman_pull_push.py
|
2023-09-20 12:58:55 +02:00
|
|
|
|
|
|
|
Test Case - Security Hub
|
|
|
|
[Tags] security_hub
|
|
|
|
Harbor API Test ./tests/apitests/python/test_security_hub.py
|
2023-10-31 09:54:04 +01:00
|
|
|
|
|
|
|
Test Case - Banner Message
|
|
|
|
[Tags] banner_message
|
|
|
|
Harbor API Test ./tests/apitests/python/test_banner_message.py
|
2023-11-29 03:25:02 +01:00
|
|
|
|
|
|
|
Test Case - User CRUD
|
|
|
|
[Tags] user_crud
|
|
|
|
Harbor API Test ./tests/apitests/python/test_user_crud.py
|