From af456e66ee99995c4def3b7494ebedcc78989209 Mon Sep 17 00:00:00 2001 From: danfengliu Date: Thu, 6 Feb 2020 13:54:16 +0800 Subject: [PATCH] Fix project quotas API test issue In project quotas API test, pull images from goharbor namespace instead of library: 1. Replace image source in API test; 2. Modify criteria for verify project configuration modification. Signed-off-by: danfengliu --- tests/apitests/python/test_project_quota.py | 2 +- tests/resources/Harbor-Pages/Project.robot | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/apitests/python/test_project_quota.py b/tests/apitests/python/test_project_quota.py index 535fb20be..67263dfdc 100644 --- a/tests/apitests/python/test_project_quota.py +++ b/tests/apitests/python/test_project_quota.py @@ -67,7 +67,7 @@ class TestProjects(unittest.TestCase): #4.Push an image to project(PA) by user(UA), then check the project quota usage; -- {"count": 1, "storage": 2791709} #image = "harbor-repo.vmware.com/harbor-ci/alpine" - image = "alpine" + image = "goharbor/alpine" src_tag = "3.10" TestProjects.repo_name, _ = push_image_to_project(project_test_quota_name, harbor_server, user_test_quota_name, user_001_password, image, src_tag) diff --git a/tests/resources/Harbor-Pages/Project.robot b/tests/resources/Harbor-Pages/Project.robot index db9e61f18..11bb86835 100644 --- a/tests/resources/Harbor-Pages/Project.robot +++ b/tests/resources/Harbor-Pages/Project.robot @@ -106,7 +106,9 @@ Make Project Private Retry Checkbox Should Be Selected ${project_config_public_checkbox} Retry Double Keywords When Error Retry Element Click ${project_config_public_checkbox_label} Retry Checkbox Should Not Be Selected ${project_config_public_checkbox} Retry Element Click //button[contains(.,'SAVE')] - Retry Wait Until Page Contains Configuration has been successfully saved + Go Into Project ${project name} + Switch To Project Configuration + Retry Checkbox Should Not Be Selected ${project_config_public_checkbox} Make Project Public [Arguments] ${projectname} @@ -115,7 +117,9 @@ Make Project Public Retry Checkbox Should Not Be Selected ${project_config_public_checkbox} Retry Double Keywords When Error Retry Element Click ${project_config_public_checkbox_label} Retry Checkbox Should Be Selected ${project_config_public_checkbox} Retry Element Click //button[contains(.,'SAVE')] - Retry Wait Until Page Contains Configuration has been successfully saved + Go Into Project ${project name} + Switch To Project Configuration + Retry Checkbox Should Be Selected ${project_config_public_checkbox} Delete Repo [Arguments] ${projectname}