mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-06 10:44:36 +01:00
2.0 KiB
2.0 KiB
Test 2-01 - User Create Project (DB Mode)
Purpose:
To verify that a non-admin user can create projects 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 two non-admin users are in Harbor.
Test Steps:
NOTE:
In below test, user A and B are non-admin users. User A, B and project X, Y should be replaced by longer and meaningful names.
- Log in to UI as user A (non-admin).
- Create a new project X with publicity is off (default).
- Create another new project Y with publicity is on .
- While keeping user A logging on, in another browswer log in as user B (non-admin).
- User B checks his/her public projects to see if project Y is listed and project X is not listed.
- User A changes project X's publicity to on, project Y's publicity to off.
- User B refreshes his/her public projects to see if project X is listed and project Y is not listed.
- On a Docker client host, use
docker login <harbor_host>
to log in as user A. - User A runs
docker push
to push an image to project X, push an image to project Y. - User A checks in the browser that the images had been successfully pushed to project X and Y.
- On a Docker client host, use
docker login <harbor_host>
to log in as user B. - User B runs
docker pull
to an image of project X, and an image of project Y.
Expected Outcome:
- Step 5, user B should see project Y is listed and project X is not listed.
- Step 7, user B should see project X is listed and project Y is not listed.
- Step 9,10, images should be pushed to project X and Y successfully and can be viewed from UI.
- Step 11,12, user B can pull the image of project X, cannot pull from project Y.
Possible Problems:
None