fix: privileges member successfully typo (#19091)

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
Co-authored-by: Shengwen YU <yshengwen@vmware.com>
This commit is contained in:
guangwu 2023-08-07 17:21:38 +08:00 committed by GitHub
parent b8f2ef9c9e
commit 345b5e545d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -58,8 +58,8 @@ class TestRobotAccount(unittest.TestCase):
1. Create user(UA); 1. Create user(UA);
2. Create private project(PA), private project(PB) and public project(PC) by user(UA); 2. Create private project(PA), private project(PB) and public project(PC) by user(UA);
3. Push image(ImagePA) to project(PA), image(ImagePB) to project(PB) and image(ImagePC) to project(PC) by user(UA); 3. Push image(ImagePA) to project(PA), image(ImagePB) to project(PB) and image(ImagePC) to project(PC) by user(UA);
4. Create a new robot account(RA) with pull and push privilige in project(PA) by user(UA); 4. Create a new robot account(RA) with pull and push privilege in project(PA) by user(UA);
5. Check robot account info, it should has both pull and push priviliges; 5. Check robot account info, it should has both pull and push privileges;
6. Pull image(ImagePA) from project(PA) by robot account(RA), it must be successful; 6. Pull image(ImagePA) from project(PA) by robot account(RA), it must be successful;
7. Push image(ImageRA) to project(PA) by robot account(RA), it must be successful; 7. Push image(ImageRA) to project(PA) by robot account(RA), it must be successful;
8. Push image(ImageRA) to project(PB) by robot account(RA), it must be not successful; 8. Push image(ImageRA) to project(PB) by robot account(RA), it must be not successful;

View File

@ -49,7 +49,7 @@ class TestScanImageInPublicProject(unittest.TestCase):
self.scan.scan_artifact(project_name, repo_name, tag, expect_status_code=401, username=None, password=None) self.scan.scan_artifact(project_name, repo_name, tag, expect_status_code=401, username=None, password=None)
with created_user(password) as (_, username1): with created_user(password) as (_, username1):
# scan image with non project memeber # scan image with non project member
self.scan.scan_artifact(project_name, repo_name, tag, expect_status_code=403, username=username1, password=password) self.scan.scan_artifact(project_name, repo_name, tag, expect_status_code=403, username=username1, password=password)
self.scan.scan_artifact(project_name, repo_name, tag, username=username, password=password) self.scan.scan_artifact(project_name, repo_name, tag, username=username, password=password)

View File

@ -200,7 +200,7 @@ fi
## --------------------------------------------- Upload Harbor Latest Build File ---------------------------------- ## --------------------------------------------- Upload Harbor Latest Build File ----------------------------------
# #
# latest.build file holds the latest offline installer url, it must be sure that the installer has been uploaded successfull. # latest.build file holds the latest offline installer url, it must be sure that the installer has been uploaded successfully.
# #
if [ $upload_latest_build == true ] && [ $upload_bundle_success == true ]; then if [ $upload_latest_build == true ] && [ $upload_bundle_success == true ]; then
echo 'https://storage.googleapis.com/'$harbor_target_bucket/$harbor_offline_build_bundle > $latest_build_file echo 'https://storage.googleapis.com/'$harbor_target_bucket/$harbor_offline_build_bundle > $latest_build_file