Commit Graph

42 Commits

Author SHA1 Message Date
Yang Jiao 660e1d1362
Remove chartmuseum test case (#18267)
Harbor deprecates chartmuseum as of v2.8.0
Epic: #17958
Discussion: #15057

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-02-24 10:56:28 +08:00
Yang Jiao a56d927143
Remove the log in testcase (#17500)
Remove logs that do not need to be printed

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-09-06 14:15:45 +08:00
danfengliu 7fb9dbd0fa 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-02-24 15:43:11 +08:00
danfengliu 642bb26c39 Fix nightly issues caused by docker upgrade to 20
1. Local image should be removed, otherwise docker 20 will not tigger
get manifest request to harbor;
2. E2E image Dockerfile update;
3. Fix nighlty test issue of tag retention, add execution refesh to get
result;
4. Fix nighlty test keyword 'Create An New Project And Go Into
Project' issue that waiting long enough time for list display;
5. Add nightly test case, in GUI, scan result will show if cve id exist in allow list configuration;
6. Move proxy cache test to schdule pipeline, it will save some time for
db pipeline.

Signed-off-by: danfengliu <danfengl@vmware.com>
2021-01-28 11:44:32 +08:00
Danfeng Liu (c) ddf9d74135 Fix nightly keyword issues
1. Add retry for Get Statics Text keywords make this operation robust;
2. Replace image to one with slash in name for CNAB test, to cover more
condition;
3. Add replication rule deletion verfication in upgrade test;
4. Add non-admin user in pull operation for proxy cache test;
5. Add verification for quota display for upgrade test;
6. Add test for large size of image replication;
7. Add test checkpoint for system robot account py-test script;

Signed-off-by: Danfeng Liu (c) <danfengl@vmware.com>
2021-01-19 15:12:15 +08:00
Dirk Mueller 903707d6c2
Fix repoitory -> repository typo (#13794)
Signed-off-by: Dirk Mueller <dirk@dmllr.de>
2021-01-16 19:34:43 +08:00
danfengliu f57dc13081 Add py-test for system robot account
In this py-test, add a new system robot account, and verify all project privileges.

Signed-off-by: danfengliu <danfengl@vmware.com>
2021-01-08 12:01:53 +08:00
Danfeng Liu (c) ae05e3fdb0 Add Nightly GUI test for system robot account
1. Add GUI test for system robot account feature;
2. Fix issue of failing to catch docker pull image exception in API test.

Signed-off-by: Danfeng Liu (c) <danfengl@vmware.com>
2021-01-06 15:47:04 +08:00
danfengliu 56a35437b4
Change image source in e2e pytest (#13640)
Change source of most of test image samples from docker-hub to local building ones, so it will cost less docker-hub pull requests.
And some of cases like push cnab, they have to use docker-hub, but image samples in cnab test will cost 17 quotas, in this PR, we
replace those samples, now cnab case will cost 6 quotas.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-12-04 02:28:29 -08:00
danfengliu 2bf89e9356 Add docker-hub login before docker-hub pull
Due to docker-hub pull request rate limitation, we will use registed account to pull image
from docker-hub, therefore add docker-hub login in API tests.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-11-22 21:11:05 +08:00
danfengliu 444de8536a Suppress urllib3 warning and fix nightly element locator issue and remove switch scanner
1. Since upgrade python to 3.7, some urllib3 warnings come out during
   execution, because missing disconnection when using request by docker
   library, it's not affect script execution, therefore ignore them first.
2. Replication tests failed in nightly due to new UI code, some element
   locators are not valid anymore;
3. Remove switch scanner test steps, since Clair was removed.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-11-10 10:04:46 +08:00
danfengliu 1b127b16c5 Add API test scripts for tag immutability and scan signed image
1. Add 7 API python test scripts for tag immutability;
2. Swagger file has object struct defination issue on imuutability policy rule, because
   this policy is in shared with retention rule, therefore, they should be unified to
   the same  type of rule;
3. Fixed a timeout issue of action keyword, waiting for a long period;
4. Add API test scripts for scan signed image.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-11-03 10:10:06 +00:00
He Weiwei f309896f2f refactor(api): generate project apis by go-swagger
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-08-15 16:10:57 +00:00
danfengliu 3b8a2890f9 Upgrade robot-framework and Selenium library
1. Upgrade robot-framework to 3.1 and Selenium library to 4.4.0.
2. Fix a registry issue for clear filter text input.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-08-06 07:25:53 +00:00
danfengliu 8a691c5df1 Add OIDC user onboard test in nightly
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-07-27 13:56:18 +08:00
danfengliu 0cb378d8fa Verify error message when deleting signed image
1. Verify error message when deleting signed image;
2. Add test case - Replication From Dockerhub;

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-07-06 10:56:31 +08:00
danfengliu f8ce615e12 Add ctr command for pulling oci
1. Manifest list can be pulled by ctr;
2. ui-test missing key checkpoint, fix it by add checking scan detail result;
3. add tag retension untag image test;

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-04-28 15:01:49 +08:00
danfengliu 77e9fc38c7 Modify api test for test step of add addition
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-03-18 17:32:10 +08:00
danfengliu 995ce30c58 Modify API test for scan image since harbor v2 API presented
1. System level Scan All;
2. Scan An Image Artifact

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-03-18 10:15:07 +08:00
danfengliu 843b05c2d3 Add script of push cnab bunlde API test
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-03-16 17:37:16 +08:00
danfengliu 2d6e18a895 Add API test case of pushing index by docker manifest
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-03-02 06:31:59 +00:00
danfengliu 4933bb634f Upgrade repository API tests to V2.0
Enable _xsrf in cookies in swagger.yaml, so that scripts don't have to handle it.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-02-24 18:15:25 +08:00
He Weiwei 8964a8697a build(clair): internal clair adapter when install with clair
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2019-10-17 12:00:51 +08:00
Ziming Zhang 722e45b20b add swagger for tag retention
Signed-off-by: Ziming Zhang <zziming@vmware.com>
Change-Id: I0f3ed8085e231868de74c273ba85946826181d5b
2019-09-06 17:27:20 +08:00
danfengliu e08c2e757e This API test script was blocked by a swagger error, now this error was fixed, so robot account script can be finished now. In swagger.yaml, robot account can be updated in "disbled" status, it's added into script. (#7636)
Signed-off-by: danfengliu <danfengl@vmware.com>
2019-05-06 11:34:11 +08:00
danfengliu 08b346ee1e
Add API test case for retag, create a user and 2 projects by this new user, push image to 1st project, and retag this image to 2nd project. (#7300)
Signed-off-by: danfengliu <danfengl@vmware.com>
2019-04-11 15:05:46 +08:00
Yan 8d3946a0e2
Refactor scan all api (#7120)
* Refactor scan all api

This commit is to let scan all api using admin job to handle schedule
management. After the PR, GC and scan all share unified code path.

Signed-off-by: wang yan <wangyan@vmware.com>

* update admin job api code according to review comments

Signed-off-by: wang yan <wangyan@vmware.com>

* Update test code and comments per review

Signed-off-by: wang yan <wangyan@vmware.com>
2019-03-22 17:52:21 +08:00
danfengliu eaedd89c25 add api test case for robot user, and modify swagger.yaml for wrong type of return value. (#6900)
Signed-off-by: danfengliu <danfengl@vmware.com>
2019-02-18 13:47:16 +08:00
danfengliu 70016cc0eb
Change a small docker image to pull and make timeout value longer (#6543)
Signed-off-by: danfengliu <danfengl@vmware.com>
2018-12-18 10:21:03 +08:00
danfengliu 7c57864c99 Remove 2 redundant functions, pull_harbor_image_successfully and pull_harbor_image_unsuccessfully.
Signed-off-by: danfengliu <danfengl@vmware.com>
2018-12-04 13:46:07 +08:00
danfengliu b4c7663f5f
Add API test case scan all images and test case API test case list helm charts. (#6388)
Signed-off-by: danfengliu <danfengl@vmware.com>
2018-12-03 17:05:06 +08:00
danfengliu 04fd4d444d
Add API test case for user view logs. (#6370)
Add API test case for user view logs.
Signed-off-by: danfengliu <danfengl@vmware.com>
2018-11-29 18:27:53 +08:00
danfengliu c4bf65162c
add api test case for garbage collection (#6366)
Add API test case for garbage collection, and add swagger.yaml, GC and chart feature were updated in swagger.yaml.
Signed-off-by: danfengliu <danfengl@vmware.com>
2018-11-27 19:17:41 +08:00
danfengliu ad77098acf
add test case project level policy content trust. (#6309)
Add test case project level policy content trust.
Signed-off-by: danfengliu <danfengl@vmware.com>
2018-11-21 12:19:28 +08:00
danfengliu 5ceebcbb10
Add tese case of manage project memebers and modify (#6304)
Move admin_client to testutil.py as global parameter.
Change create_repository function name to push_image_to_project to make it reasonable.
Signed-off-by: danfengliu <danfengl@vmware.com>
2018-11-20 14:24:13 +08:00
danfengliu dcd34a37a9 add test case scan a not scanned image
Modify for codacy issues.
Signed-off-by: danfengliu <danfengl@vmware.com>
2018-11-16 15:35:15 +08:00
danfengliu 90fda71e4a Recovery repository.py for calling wrong create function (#6268)
Signed-off-by: danfengliu <danfengl@vmware.com>
2018-11-13 12:53:46 +08:00
danfengliu ce8a585858 modfiy repo
Signed-off-by: danfengliu <danfengl@vmware.com>
2018-11-08 10:33:14 +08:00
danfengliu 9265754936 modify codacy errors in target
Signed-off-by: danfengliu <danfengl@vmware.com>
2018-11-08 10:33:14 +08:00
danfengliu 1979d17550 add tc add-sys-label-to-tag and del-repo
Signed-off-by: danfengliu <danfengl@vmware.com>
2018-11-02 17:16:43 +08:00
danfengliu 894e0591bb add new api tests (#6127)
Add API test libraries which were based on swagger doc,
it's including user and project , also add one scenario
test case which is test_add_member_to_private_project to
verify a user can see a project when the uesr is the member of it.
Delete 2 old test case.Delete a quota.

Signed-off-by: danfengliu <danfengl@vmware.com>
2018-10-31 13:13:31 +08:00
Wenkai Yin 95c0c259ec Add E2E API test cases for replication based on labels (#5639)
This commit creates a new E2E API test case to verify the replication based on label

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2018-08-16 18:36:27 +08:00