mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-18 16:25:16 +01:00
1.6 KiB
1.6 KiB
Test 2-05 - User Delete Images (DB Mode)
Purpose:
To verify that a non-admin user can delete images 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, Y 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 a second image with different tag to project X, e.g. projectX/myimage:v2 .
- 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, delete the three images one by one.
- On a Docker client, log in as User A and run
docker pull
to pull the three deleted images of project X. - In UI, delete project X.
- Run
docker pull
to pull the three deleted images of the project X.
Expected Outcome:
- Step 7, images should be deleted successfully.
- Step 9, project X should be deleted successfully.
- Step 8,10, docker client should report error message.
Possible Problems:
None