diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-10-23 12:15:29 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-10-23 15:09:57 +0200 |
commit | 39b8e7628f1c1763ba6db389fa83264dd425ef7c (patch) | |
tree | 53cca16e541504ca99f953e34f45904bd1f7a759 /sonar-core/src/test/resources | |
parent | dabfb5f4d87c195a7190a60c0d2f955324583f69 (diff) | |
download | sonarqube-39b8e7628f1c1763ba6db389fa83264dd425ef7c.tar.gz sonarqube-39b8e7628f1c1763ba6db389fa83264dd425ef7c.zip |
SONAR-5188 Use PROJECT_UUID from PROJECTS table to simplify some requests and security checks
Diffstat (limited to 'sonar-core/src/test/resources')
-rw-r--r-- | sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/get_last_snapshot_by_component_uuid.xml (renamed from sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/get_last_snapshot_by_resource_id.xml) | 4 | ||||
-rw-r--r-- | sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/should_find_children_component_ids_for_secured_project_for_group.xml | 78 | ||||
-rw-r--r-- | sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/should_find_children_component_ids_for_secured_project_for_user.xml | 76 |
3 files changed, 4 insertions, 154 deletions
diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/get_last_snapshot_by_resource_id.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/get_last_snapshot_by_component_uuid.xml index 0e975c6137e..b60896e0123 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/get_last_snapshot_by_resource_id.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/get_last_snapshot_by_component_uuid.xml @@ -6,6 +6,7 @@ <!-- root project --> <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" + uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="[null]" description="the description" long_name="Apache Struts" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="[null]"/> <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" @@ -29,6 +30,7 @@ <!-- module --> <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core" + uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="ABCD." scope="PRJ" qualifier="BRC" long_name="Struts Core" description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> <snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1" @@ -43,6 +45,7 @@ <!-- directory --> <projects long_name="org.struts" id="3" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts" + uuid="GHIJ" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path="ABCD.EFGH." name="src/org/struts" root_id="2" description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" authorization_updated_at="[null]"/> @@ -58,6 +61,7 @@ <!-- file --> <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContext.java" + uuid="KLMN" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path="ABCD.EFGH." name="RequestContext.java" root_id="2" description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/should_find_children_component_ids_for_secured_project_for_group.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/should_find_children_component_ids_for_secured_project_for_group.xml deleted file mode 100644 index 62891ca34dd..00000000000 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/should_find_children_component_ids_for_secured_project_for_group.xml +++ /dev/null @@ -1,78 +0,0 @@ -<dataset> - - <!-- user 100 has no direct grant access, but is in the group 200 that has the role "user" - on the project 1 --> - <user_roles id="1" user_id="100" resource_id="999" role="user"/> - <groups_users user_id="100" group_id="200"/> - <group_roles id="1" group_id="200" resource_id="1" role="user"/> - - - <!-- root project --> - <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" - description="the description" long_name="Apache Struts" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> - <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" - status="P" islast="[true]" purge_status="[null]" - period1_mode="[null]" period1_param="[null]" period1_date="[null]" - period2_mode="[null]" period2_param="[null]" period2_date="[null]" - period3_mode="[null]" period3_param="[null]" period3_date="[null]" - period4_mode="[null]" period4_param="[null]" period4_date="[null]" - period5_mode="[null]" period5_param="[null]" period5_date="[null]" - depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00" - version="[null]" path=""/> - <snapshots id="10" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" - status="P" islast="[false]" purge_status="[null]" - period1_mode="[null]" period1_param="[null]" period1_date="[null]" - period2_mode="[null]" period2_param="[null]" period2_date="[null]" - period3_mode="[null]" period3_param="[null]" period3_date="[null]" - period4_mode="[null]" period4_param="[null]" period4_date="[null]" - period5_mode="[null]" period5_param="[null]" period5_date="[null]" - depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-01 13:58:00.00" build_date="2008-12-01 13:58:00.00" - version="[null]" path=""/> - - <!-- project --> - <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core" - scope="PRJ" qualifier="BRC" long_name="Struts Core" - description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> - <snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1" - status="P" islast="[true]" purge_status="[null]" - period1_mode="[null]" period1_param="[null]" period1_date="[null]" - period2_mode="[null]" period2_param="[null]" period2_date="[null]" - period3_mode="[null]" period3_param="[null]" period3_date="[null]" - period4_mode="[null]" period4_param="[null]" period4_date="[null]" - period5_mode="[null]" period5_param="[null]" period5_date="[null]" - depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00" - version="[null]" path="1."/> - - <!-- directory --> - <projects long_name="org.struts" id="3" scope="DIR" qualifier="PAC" kee="org.struts:struts:org.struts" - name="org.struts" root_id="1" - description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> - <snapshots id="3" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1" - status="P" islast="[true]" purge_status="[null]" - period1_mode="[null]" period1_param="[null]" period1_date="[null]" - period2_mode="[null]" period2_param="[null]" period2_date="[null]" - period3_mode="[null]" period3_param="[null]" period3_date="[null]" - period4_mode="[null]" period4_param="[null]" period4_date="[null]" - period5_mode="[null]" period5_param="[null]" period5_date="[null]" - depth="[null]" scope="DIR" qualifier="PAC" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00" - version="[null]" path="1.2."/> - - <!-- file --> - <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA" kee="org.struts:struts:org.struts.RequestContext" - name="RequestContext" root_id="1" - description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> - - <snapshots id="4" project_id="4" parent_snapshot_id="3" root_project_id="1" root_snapshot_id="1" - status="P" islast="[true]" purge_status="[null]" - period1_mode="[null]" period1_param="[null]" period1_date="[null]" - period2_mode="[null]" period2_param="[null]" period2_date="[null]" - period3_mode="[null]" period3_param="[null]" period3_date="[null]" - period4_mode="[null]" period4_param="[null]" period4_date="[null]" - period5_mode="[null]" period5_param="[null]" period5_date="[null]" - depth="[null]" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00" - version="[null]" path="1.2.3."/> - -</dataset> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/should_find_children_component_ids_for_secured_project_for_user.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/should_find_children_component_ids_for_secured_project_for_user.xml deleted file mode 100644 index d5a2af24edc..00000000000 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/should_find_children_component_ids_for_secured_project_for_user.xml +++ /dev/null @@ -1,76 +0,0 @@ -<dataset> - - <!-- user 100 has the role "user" on the project 1 and in group 200 --> - <user_roles id="1" user_id="100" resource_id="1" role="user"/> - <groups_users user_id="100" group_id="200"/> - <group_roles id="1" group_id="200" resource_id="999" role="user"/> - - <!-- root project --> - <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" - description="the description" long_name="Apache Struts" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> - <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" - status="P" islast="[true]" purge_status="[null]" - period1_mode="[null]" period1_param="[null]" period1_date="[null]" - period2_mode="[null]" period2_param="[null]" period2_date="[null]" - period3_mode="[null]" period3_param="[null]" period3_date="[null]" - period4_mode="[null]" period4_param="[null]" period4_date="[null]" - period5_mode="[null]" period5_param="[null]" period5_date="[null]" - depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00" - version="[null]" path=""/> - <snapshots id="10" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" - status="P" islast="[false]" purge_status="[null]" - period1_mode="[null]" period1_param="[null]" period1_date="[null]" - period2_mode="[null]" period2_param="[null]" period2_date="[null]" - period3_mode="[null]" period3_param="[null]" period3_date="[null]" - period4_mode="[null]" period4_param="[null]" period4_date="[null]" - period5_mode="[null]" period5_param="[null]" period5_date="[null]" - depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-01 13:58:00.00" build_date="2008-12-01 13:58:00.00" - version="[null]" path=""/> - - <!-- project --> - <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core" - scope="PRJ" qualifier="BRC" long_name="Struts Core" - description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> - <snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1" - status="P" islast="[true]" purge_status="[null]" - period1_mode="[null]" period1_param="[null]" period1_date="[null]" - period2_mode="[null]" period2_param="[null]" period2_date="[null]" - period3_mode="[null]" period3_param="[null]" period3_date="[null]" - period4_mode="[null]" period4_param="[null]" period4_date="[null]" - period5_mode="[null]" period5_param="[null]" period5_date="[null]" - depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00" - version="[null]" path="1."/> - - <!-- directory --> - <projects long_name="org.struts" id="3" scope="DIR" qualifier="PAC" kee="org.struts:struts:org.struts" - name="org.struts" root_id="1" - description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> - <snapshots id="3" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1" - status="P" islast="[true]" purge_status="[null]" - period1_mode="[null]" period1_param="[null]" period1_date="[null]" - period2_mode="[null]" period2_param="[null]" period2_date="[null]" - period3_mode="[null]" period3_param="[null]" period3_date="[null]" - period4_mode="[null]" period4_param="[null]" period4_date="[null]" - period5_mode="[null]" period5_param="[null]" period5_date="[null]" - depth="[null]" scope="DIR" qualifier="PAC" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00" - version="[null]" path="1.2."/> - - <!-- file --> - <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA" kee="org.struts:struts:org.struts.RequestContext" - name="RequestContext" root_id="1" - description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> - - <snapshots id="4" project_id="4" parent_snapshot_id="3" root_project_id="1" root_snapshot_id="1" - status="P" islast="[true]" purge_status="[null]" - period1_mode="[null]" period1_param="[null]" period1_date="[null]" - period2_mode="[null]" period2_param="[null]" period2_date="[null]" - period3_mode="[null]" period3_param="[null]" period3_date="[null]" - period4_mode="[null]" period4_param="[null]" period4_date="[null]" - period5_mode="[null]" period5_param="[null]" period5_date="[null]" - depth="[null]" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00" - version="[null]" path="1.2.3."/> - -</dataset> |