mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 02:35:17 +01:00
1.4 KiB
1.4 KiB
Test 2-23 - Admin User Delete Images (DB Mode)
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.
- Log in to UI as user A (non-admin).
- Create a project X so that the user has the project admin role.
- 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. - Push an image with different name to project X, e.g. projectX/newimage:v1 .
- Run
docker pull
to verify images can be pulled successfully. - In UI, log out user A's session.
- Log in as admin user.
- Under project X, delete the two images one by one.
- 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