aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch/src/test/resources
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@gmail.com>2012-03-19 14:13:00 +0100
committerFabrice Bellingard <bellingard@gmail.com>2012-03-19 14:13:00 +0100
commit7127ab95012034fc643b743c11c466acd60391f4 (patch)
tree9bce238672f8f19d454edc359b46145f22ec702f /sonar-batch/src/test/resources
parent6c64694189d6997672892782c99a988db97650e3 (diff)
downloadsonarqube-7127ab95012034fc643b743c11c466acd60391f4.tar.gz
sonarqube-7127ab95012034fc643b743c11c466acd60391f4.zip
SONAR-1700 Some links to the projects end up in new session
Diffstat (limited to 'sonar-batch/src/test/resources')
-rw-r--r--sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldRemoveRootIndexIfResourceIsProject-result.xml17
-rw-r--r--sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldRemoveRootIndexIfResourceIsProject.xml12
2 files changed, 29 insertions, 0 deletions
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldRemoveRootIndexIfResourceIsProject-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldRemoveRootIndexIfResourceIsProject-result.xml
new file mode 100644
index 00000000000..147b3c37abf
--- /dev/null
+++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldRemoveRootIndexIfResourceIsProject-result.xml
@@ -0,0 +1,17 @@
+<dataset>
+
+ <projects id="1001" scope="PRJ" qualifier="TRK" kee="foo" root_id="[null]"
+ name="Foo" long_name="Foo" description="some description"
+ enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/>
+
+ <!-- old snapshot -->
+ <snapshots 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]" id="3001" project_id="1001" parent_snapshot_id="[null]" root_project_id="1001" root_snapshot_id="[null]"
+ scope="PRJ" qualifier="TRK" created_at="2010-12-23 00:00:00.00" build_date="2010-12-23 00:00:00.00" version="[null]" path=""
+ status="U" islast="false" depth="0" />
+
+ <!-- new snapshot -->
+ <snapshots 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]" id="3002" project_id="1001" parent_snapshot_id="[null]" root_project_id="1001" root_snapshot_id="[null]"
+ scope="PRJ" qualifier="TRK" created_at="2010-12-25 00:00:00.00" build_date="2010-12-25 00:00:00.00" version="[null]" path=""
+ status="U" islast="false" depth="0" />
+
+</dataset> \ No newline at end of file
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldRemoveRootIndexIfResourceIsProject.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldRemoveRootIndexIfResourceIsProject.xml
new file mode 100644
index 00000000000..56b2ab204d2
--- /dev/null
+++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldRemoveRootIndexIfResourceIsProject.xml
@@ -0,0 +1,12 @@
+<dataset>
+
+ <!-- This project has a root_id which should be set to NULL (SONAR-1700) -->
+ <projects id="1001" scope="PRJ" qualifier="TRK" kee="foo" root_id="12345"
+ name="name" long_name="long name" description="description"
+ enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/>
+
+ <snapshots 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]" id="3001" project_id="1001" parent_snapshot_id="[null]" root_project_id="1001" root_snapshot_id="[null]"
+ scope="PRJ" qualifier="TRK" created_at="2010-12-23 00:00:00.00" build_date="2010-12-23 00:00:00.00" version="[null]" path=""
+ status="U" islast="false" depth="0" />
+
+</dataset> \ No newline at end of file