diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-07-29 09:11:12 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-07-29 09:11:12 +0200 |
commit | a5cf8d9969d6f05bcd63fb77a373779285e4f9e6 (patch) | |
tree | 2923ca45f23366fc0dcadced7413a533afa347a5 /server | |
parent | 5af0e0779610017b6056b63278e1a16c6d49d25b (diff) | |
parent | 7e04ed269922c12d8d1ea6593fbb9bacb4d71283 (diff) | |
download | sonarqube-a5cf8d9969d6f05bcd63fb77a373779285e4f9e6.tar.gz sonarqube-a5cf8d9969d6f05bcd63fb77a373779285e4f9e6.zip |
Merge branch-4.4
Diffstat (limited to 'server')
3 files changed, 31 insertions, 0 deletions
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v43/TechnicalDebtMeasuresMigrationTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v43/TechnicalDebtMeasuresMigrationTest.java index 5372118b0df..34e2574427b 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v43/TechnicalDebtMeasuresMigrationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v43/TechnicalDebtMeasuresMigrationTest.java @@ -51,6 +51,15 @@ public class TechnicalDebtMeasuresMigrationTest { } @Test + public void migrate_nothing() throws Exception { + db.prepareDbUnit(getClass(), "migrate_nothing.xml"); + + migration.execute(); + + db.assertDbUnit(getClass(), "migrate_nothing.xml", "project_measures"); + } + + @Test public void migrate_technical_debt_measures() throws Exception { db.prepareDbUnit(getClass(), "migrate_technical_debt_measures.xml"); diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v43/TechnicalDebtMeasuresMigrationTest/migrate_nothing.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v43/TechnicalDebtMeasuresMigrationTest/migrate_nothing.xml new file mode 100644 index 00000000000..d4e3f4a0101 --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v43/TechnicalDebtMeasuresMigrationTest/migrate_nothing.xml @@ -0,0 +1,11 @@ +<dataset> + + <metrics delete_historical_data="[null]" id="2" name="nclc" VAL_TYPE="INTEGER" DESCRIPTION="[null]" domain="[null]" short_name="" + enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/> + + <project_measures id="2" VALUE="1.0" METRIC_ID="2" SNAPSHOT_ID="1000" alert_text="[null]" RULES_CATEGORY_ID="[null]" + RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]" + alert_status="[null]" description="[null]" rule_priority="[null]" characteristic_id="[null]" url="[null]" person_id="[null]" + variation_value_1="1.0" variation_value_2="2.0" variation_value_3="3.0" variation_value_4="4.0" variation_value_5="5.0"/> + +</dataset> diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v43/TechnicalDebtMeasuresMigrationTest/migrate_nothing_result.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v43/TechnicalDebtMeasuresMigrationTest/migrate_nothing_result.xml new file mode 100644 index 00000000000..d4e3f4a0101 --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v43/TechnicalDebtMeasuresMigrationTest/migrate_nothing_result.xml @@ -0,0 +1,11 @@ +<dataset> + + <metrics delete_historical_data="[null]" id="2" name="nclc" VAL_TYPE="INTEGER" DESCRIPTION="[null]" domain="[null]" short_name="" + enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/> + + <project_measures id="2" VALUE="1.0" METRIC_ID="2" SNAPSHOT_ID="1000" alert_text="[null]" RULES_CATEGORY_ID="[null]" + RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]" + alert_status="[null]" description="[null]" rule_priority="[null]" characteristic_id="[null]" url="[null]" person_id="[null]" + variation_value_1="1.0" variation_value_2="2.0" variation_value_3="3.0" variation_value_4="4.0" variation_value_5="5.0"/> + +</dataset> |