diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2019-10-25 10:57:25 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2019-11-06 10:04:30 +0100 |
commit | 6635d689c3912a6e80391881562a5b56e776c909 (patch) | |
tree | bed9382273f79356bc4b4341773cf83cd8f40f63 | |
parent | 2c1855cfa890c5770919c5b517a24a10fed4e742 (diff) | |
download | sonarqube-6635d689c3912a6e80391881562a5b56e776c909.tar.gz sonarqube-6635d689c3912a6e80391881562a5b56e776c909.zip |
SONAR-12512 SONAR-12514 SONAR-12515 Increase ALM key from 80 to 200
10 files changed, 15 insertions, 14 deletions
diff --git a/server/sonar-db-dao/src/schema/schema-sq.ddl b/server/sonar-db-dao/src/schema/schema-sq.ddl index 6ed58ecce37..d1f73082152 100644 --- a/server/sonar-db-dao/src/schema/schema-sq.ddl +++ b/server/sonar-db-dao/src/schema/schema-sq.ddl @@ -53,7 +53,7 @@ CREATE INDEX ALM_APP_INSTALLS_EXTERNAL_ID ON ALM_APP_INSTALLS(USER_EXTERNAL_ID); CREATE TABLE ALM_SETTINGS( UUID VARCHAR(40) NOT NULL, ALM_ID VARCHAR(40) NOT NULL, - KEE VARCHAR(40) NOT NULL, + KEE VARCHAR(200) NOT NULL, URL VARCHAR(2000), APP_ID VARCHAR(80), PRIVATE_KEY VARCHAR(2000), diff --git a/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/almsettings/AlmSettingsTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/almsettings/AlmSettingsTesting.java index dc5e8f8176f..13513e49bb8 100644 --- a/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/almsettings/AlmSettingsTesting.java +++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/almsettings/AlmSettingsTesting.java @@ -30,7 +30,7 @@ public class AlmSettingsTesting { public static AlmSettingDto newGithubAlmSettingDto() { return new AlmSettingDto() - .setKey(randomAlphanumeric(40)) + .setKey(randomAlphanumeric(200)) .setUrl(randomAlphanumeric(2000)) .setAppId(randomAlphanumeric(80)) .setPrivateKey(randomAlphanumeric(2000)) @@ -39,14 +39,14 @@ public class AlmSettingsTesting { public static AlmSettingDto newAzureAlmSettingDto() { return new AlmSettingDto() - .setKey(randomAlphanumeric(40)) + .setKey(randomAlphanumeric(200)) .setPersonalAccessToken(randomAlphanumeric(2000)) .setAlm(ALM.AZURE_DEVOPS); } public static AlmSettingDto newBitbucketAlmSettingDto() { return new AlmSettingDto() - .setKey(randomAlphanumeric(40)) + .setKey(randomAlphanumeric(200)) .setUrl(randomAlphanumeric(2000)) .setPersonalAccessToken(randomAlphanumeric(2000)) .setAlm(ALM.BITBUCKET); diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v81/CreateAlmSettingsTable.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v81/CreateAlmSettingsTable.java index abdfd3188eb..5e383dc8104 100644 --- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v81/CreateAlmSettingsTable.java +++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v81/CreateAlmSettingsTable.java @@ -39,7 +39,7 @@ public class CreateAlmSettingsTable extends DdlChange { private static final VarcharColumnDef KEY = newVarcharColumnDefBuilder() .setColumnName("kee") .setIsNullable(false) - .setLimit(40) + .setLimit(200) .build(); public CreateAlmSettingsTable(Database db) { diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v81/CreateAlmSettingsTableTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v81/CreateAlmSettingsTableTest.java index cd9114c28bf..8c0b6d15c71 100644 --- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v81/CreateAlmSettingsTableTest.java +++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v81/CreateAlmSettingsTableTest.java @@ -50,6 +50,7 @@ public class CreateAlmSettingsTableTest { dbTester.assertUniqueIndex(TABLE_NAME, "uniq_alm_settings", "kee"); dbTester.assertColumnDefinition(TABLE_NAME, "uuid", VARCHAR, 40, false); + dbTester.assertColumnDefinition(TABLE_NAME, "kee", VARCHAR, 200, false); dbTester.assertColumnDefinition(TABLE_NAME, "alm_id", VARCHAR, 40, false); dbTester.assertColumnDefinition(TABLE_NAME, "url", VARCHAR, 2000, true); dbTester.assertColumnDefinition(TABLE_NAME, "app_id", VARCHAR, 80, true); diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/CreateAzureAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/CreateAzureAction.java index f3c8c37b4d8..2d0e1ee3861 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/CreateAzureAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/CreateAzureAction.java @@ -55,7 +55,7 @@ public class CreateAzureAction implements AlmSettingsWsAction { action.createParam(PARAM_KEY) .setRequired(true) - .setMaximumLength(40) + .setMaximumLength(200) .setDescription("Unique key of the Azure Devops instance setting"); action.createParam(PARAM_PERSONAL_ACCESS_TOKEN) .setRequired(true) diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/CreateBitBucketAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/CreateBitBucketAction.java index 8dabed7ae48..4cd2fa3bd84 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/CreateBitBucketAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/CreateBitBucketAction.java @@ -56,7 +56,7 @@ public class CreateBitBucketAction implements AlmSettingsWsAction { action.createParam(PARAM_KEY) .setRequired(true) - .setMaximumLength(40) + .setMaximumLength(200) .setDescription("Unique key of the Bitbucket instance setting"); action.createParam(PARAM_URL) .setRequired(true) diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/CreateGithubAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/CreateGithubAction.java index 605498ec45e..a63440243d1 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/CreateGithubAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/CreateGithubAction.java @@ -57,7 +57,7 @@ public class CreateGithubAction implements AlmSettingsWsAction { action.createParam(PARAM_KEY) .setRequired(true) - .setMaximumLength(40) + .setMaximumLength(200) .setDescription("Unique key of the GitHub instance setting"); action.createParam(PARAM_URL) .setRequired(true) diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/UpdateAzureAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/UpdateAzureAction.java index b5beeab5f07..096ae7ab8d0 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/UpdateAzureAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/UpdateAzureAction.java @@ -56,11 +56,11 @@ public class UpdateAzureAction implements AlmSettingsWsAction { action.createParam(PARAM_KEY) .setRequired(true) - .setMaximumLength(40) + .setMaximumLength(200) .setDescription("Unique key of the Azure instance setting"); action.createParam(PARAM_NEW_KEY) .setRequired(false) - .setMaximumLength(40) + .setMaximumLength(200) .setDescription("Optional new value for an unique key of the Azure Devops instance setting"); action.createParam(PARAM_PERSONAL_ACCESS_TOKEN) .setRequired(true) diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/UpdateBitbucketAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/UpdateBitbucketAction.java index 58aee2f9b6f..3cad3e4e6cd 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/UpdateBitbucketAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/UpdateBitbucketAction.java @@ -57,11 +57,11 @@ public class UpdateBitbucketAction implements AlmSettingsWsAction { action.createParam(PARAM_KEY) .setRequired(true) - .setMaximumLength(40) + .setMaximumLength(200) .setDescription("Unique key of the Bitbucket instance setting"); action.createParam(PARAM_NEW_KEY) .setRequired(false) - .setMaximumLength(40) + .setMaximumLength(200) .setDescription("Optional new value for an unique key of the Bitbucket instance setting"); action.createParam(PARAM_URL) .setRequired(true) diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/UpdateGitHubAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/UpdateGitHubAction.java index 5b4f388c504..24c72bac8a4 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/UpdateGitHubAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almsettings/UpdateGitHubAction.java @@ -58,11 +58,11 @@ public class UpdateGitHubAction implements AlmSettingsWsAction { action.createParam(PARAM_KEY) .setRequired(true) - .setMaximumLength(40) + .setMaximumLength(200) .setDescription("Unique key of the GitHub instance setting"); action.createParam(PARAM_NEW_KEY) .setRequired(false) - .setMaximumLength(40) + .setMaximumLength(200) .setDescription("Optional new value for an unique key of the GitHub instance setting"); action.createParam(PARAM_URL) .setRequired(true) |