From 88a4c0d3150f105c677316ca62fece017cb41925 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Tue, 17 Oct 2017 10:59:54 +0200 Subject: [PATCH] SONAR-9954 add hidden property sonar.editions.jsonUrl with production default value --- .../ce/container/ComputeEngineContainerImplTest.java | 2 +- .../org/sonar/core/config/CorePropertyDefinitions.java | 10 ++++++++++ .../sonar/core/config/CorePropertyDefinitionsTest.java | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java index 9f02e6aa47c..e70437c795b 100644 --- a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java +++ b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java @@ -114,7 +114,7 @@ public class ComputeEngineContainerImplTest { + 26 // level 1 + 52 // content of DaoModule + 3 // content of EsSearchModule - + 66 // content of CorePropertyDefinitions + + 67 // content of CorePropertyDefinitions + 1 // StopFlagContainer ); assertThat( diff --git a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java index 817759783fb..9b0390856ef 100644 --- a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java +++ b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java @@ -47,6 +47,7 @@ public class CorePropertyDefinitions { public static final String ORGANIZATIONS_CREATE_PERSONAL_ORG = "sonar.organizations.createPersonalOrg"; public static final String ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS = "sonar.onboardingTutorial.showToNewUsers"; public static final String DISABLE_NOTIFICATION_ON_BUILT_IN_QPROFILES = "sonar.builtInQualityProfiles.disableNotificationOnUpdate"; + public static final String EDITIONS_CONFIG_URL = "sonar.editions.jsonUrl"; private CorePropertyDefinitions() { // only static stuff @@ -254,6 +255,15 @@ public class CorePropertyDefinitions { .category(CATEGORY_ORGANIZATIONS) .type(BOOLEAN) .hidden() + .build(), + + // EDITIONS + PropertyDefinition.builder(EDITIONS_CONFIG_URL) + .name("Defines URL of JSON file with the definitions of SonarSource editions.") + .defaultValue("https://resources.sonarsource.com/editions.json") + .category(CATEGORY_ORGANIZATIONS) + .type(BOOLEAN) + .hidden() .build())); return defs; } diff --git a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java index aa7bcd07d0d..4144587b4be 100644 --- a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java @@ -33,7 +33,7 @@ public class CorePropertyDefinitionsTest { @Test public void all() { List defs = CorePropertyDefinitions.all(); - assertThat(defs).hasSize(66); + assertThat(defs).hasSize(67); } @Test -- 2.39.5