aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-webapi
diff options
context:
space:
mode:
authorJacek <jacek.poreda@sonarsource.com>2020-04-17 16:39:24 +0200
committersonartech <sonartech@sonarsource.com>2020-05-25 20:05:20 +0000
commit65e12a8ca01341c1ad00809d807bb8db0f5bf4b2 (patch)
treef180f5b44896c8d606b14483597bd0f48b5ec4d9 /server/sonar-webserver-webapi
parent75d31b4c5df84ea9188feba72ed7dec4e558625e (diff)
downloadsonarqube-65e12a8ca01341c1ad00809d807bb8db0f5bf4b2.tar.gz
sonarqube-65e12a8ca01341c1ad00809d807bb8db0f5bf4b2.zip
SONAR-13221 change PK to uuid of RULES_PARAMETERS table
* change rules_parameter_id of ACTIVE_RULE_PARAMETERS table to rules_parameter_uuid
Diffstat (limited to 'server/sonar-webserver-webapi')
-rw-r--r--server/sonar-webserver-webapi/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryImplTest.java4
-rw-r--r--server/sonar-webserver-webapi/src/test/java/org/sonar/server/rule/RuleUpdaterTest.java2
-rw-r--r--server/sonar-webserver-webapi/src/test/java/org/sonar/server/rule/ws/ShowActionTest.java2
3 files changed, 4 insertions, 4 deletions
diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryImplTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryImplTest.java
index 7de814aad06..f365dadb1bb 100644
--- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryImplTest.java
+++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryImplTest.java
@@ -251,7 +251,7 @@ public class QProfileFactoryImplTest {
ActiveRuleDto activeRuleDto = db.qualityProfiles().activateRule(profile, rule);
ActiveRuleParamDto activeRuleParam = new ActiveRuleParamDto()
- .setRulesParameterId(ruleParam.getId())
+ .setRulesParameterUuid(ruleParam.getUuid())
.setKey("foo")
.setValue("bar");
db.getDbClient().activeRuleDao().insertParam(dbSession, activeRuleDto, activeRuleParam);
@@ -277,7 +277,7 @@ public class QProfileFactoryImplTest {
db.getDbClient().activeRuleDao().insert(dbSession, activeRuleDto);
ActiveRuleParamDto activeRuleParam = new ActiveRuleParamDto()
- .setRulesParameterId(ruleParam.getId())
+ .setRulesParameterUuid(ruleParam.getUuid())
.setKey("foo")
.setValue("bar");
db.getDbClient().activeRuleDao().insertParam(dbSession, activeRuleDto, activeRuleParam);
diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/rule/RuleUpdaterTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/rule/RuleUpdaterTest.java
index 4832470ba06..adc22dd84b2 100644
--- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/rule/RuleUpdaterTest.java
+++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/rule/RuleUpdaterTest.java
@@ -458,7 +458,7 @@ public class RuleUpdaterTest {
db.getDbClient().activeRuleDao().insert(dbSession, activeRuleDto);
db.getDbClient().activeRuleDao().insertParam(dbSession, activeRuleDto, new ActiveRuleParamDto()
.setActiveRuleUuid(activeRuleDto.getUuid())
- .setRulesParameterId(ruleParam1.getId())
+ .setRulesParameterUuid(ruleParam1.getUuid())
.setKey(ruleParam1.getName())
.setValue(ruleParam1.getDefaultValue()));
dbSession.commit();
diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/rule/ws/ShowActionTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/rule/ws/ShowActionTest.java
index 50f33b8de1e..454001cb508 100644
--- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/rule/ws/ShowActionTest.java
+++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/rule/ws/ShowActionTest.java
@@ -421,7 +421,7 @@ public class ShowActionTest {
QProfileDto qProfile = db.qualityProfiles().insert(organization);
ActiveRuleDto activeRule = db.qualityProfiles().activateRule(qProfile, rule);
db.getDbClient().activeRuleDao().insertParam(db.getSession(), activeRule, new ActiveRuleParamDto()
- .setRulesParameterId(ruleParam.getId())
+ .setRulesParameterUuid(ruleParam.getUuid())
.setKey(ruleParam.getName())
.setValue(".*?"));
db.commit();