harbor/tests/testcases/Group2-image-management/2-23-admin-delete-images.md

37 lines
1.4 KiB
Markdown
Raw Normal View History

2016-10-30 17:04:31 +01:00
Test 2-23 - Admin User Delete Images (DB Mode)
2016-10-25 16:38:39 +02:00
=======
# Purpose:
To verify that an admin user can delete images owned by other users when users are managed locally by Harbor (DB mode).
# References:
User guide
# Environment:
* This test requires that a Harbor instance is running and available.
* Harbor is set to authenticate against a local database. ( auth_mode is set to **db_auth** .) The user data is stored in a local database.
* A linux host with Docker CLI installed (Docker client).
* At least a non-admin user.
# Test Steps:
**NOTE:**
In below test, user A is non-admin user. User A and project X should be replaced by longer and meaningful names.
1. Log in to UI as user A (non-admin).
2. Create a project X so that the user has the project admin role.
3. On a Docker client, log in as User A and run `docker push` to push an image to the project X, e.g. projectX/myimage:v1.
4. Push an image with different name to project X, e.g. projectX/newimage:v1 .
2016-11-07 14:27:22 +01:00
5. Run `docker pull` to verify images can be pulled successfully.
2016-10-25 16:38:39 +02:00
6. In UI, log out user A's session.
7. Log in as admin user.
8. Under project X, delete the two images one by one.
9. On a Docker client, log in as User A and run `docker pull` to pull the two deleted images of project X.
# Expected Outcome:
* Step 8, admin user can delete images of project X.
* Step 9, docker client should report errors.
# Possible Problems:
None