aboutsummaryrefslogtreecommitdiffstats
path: root/it
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2017-01-05 18:46:00 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2017-01-10 09:56:54 +0100
commit7ee49838b7b3d4e657b80669a3bbf58d5658a220 (patch)
treef33369e4eabe123b0d715d7e930927c36d93177c /it
parent2cf9f9bbdf41647d6d4176ae1bd15f5f9d0d2d57 (diff)
downloadsonarqube-7ee49838b7b3d4e657b80669a3bbf58d5658a220.tar.gz
sonarqube-7ee49838b7b3d4e657b80669a3bbf58d5658a220.zip
SONAR-7300 Replace "setting.license" by "setting.license.secured" in IT plugin
Diffstat (limited to 'it')
-rw-r--r--it/it-plugins/server-plugin/src/main/java/ServerPlugin.java2
-rw-r--r--it/it-tests/src/test/java/it/settings/DeprecatedPropertiesWsTest.java15
2 files changed, 8 insertions, 9 deletions
diff --git a/it/it-plugins/server-plugin/src/main/java/ServerPlugin.java b/it/it-plugins/server-plugin/src/main/java/ServerPlugin.java
index 1b77a575c8a..9b7b820dbaa 100644
--- a/it/it-plugins/server-plugin/src/main/java/ServerPlugin.java
+++ b/it/it-plugins/server-plugin/src/main/java/ServerPlugin.java
@@ -50,7 +50,7 @@ import static org.sonar.api.PropertyType.USER_LOGIN;
@Property(key = "float", name = "Float", type = FLOAT, global = true, project = false),
@Property(key = "int", name = "Integer", type = INTEGER, global = true, project = false),
@Property(key = "string", name = "String", type = STRING, global = true, project = false),
- @Property(key = "setting.license", name = "License", type = LICENSE, global = true, project = false),
+ @Property(key = "setting.license.secured", name = "License", type = LICENSE, global = true, project = false),
@Property(key = "long", name = "Long", type = LONG, global = true, project = false),
@Property(key = "password", name = "Password", type = PASSWORD, global = true, project = false),
@Property(key = "text", name = "Text", type = TEXT, global = true, project = false),
diff --git a/it/it-tests/src/test/java/it/settings/DeprecatedPropertiesWsTest.java b/it/it-tests/src/test/java/it/settings/DeprecatedPropertiesWsTest.java
index 543936fcbc6..efe590f63a9 100644
--- a/it/it-tests/src/test/java/it/settings/DeprecatedPropertiesWsTest.java
+++ b/it/it-tests/src/test/java/it/settings/DeprecatedPropertiesWsTest.java
@@ -93,7 +93,7 @@ public class DeprecatedPropertiesWsTest {
}
private static void doResetSettings() {
- resetSettings(orchestrator, null, "some-property", "int", "multi", "boolean", "hidden", "not_defined", "setting.secured", "setting.license", "list");
+ resetSettings(orchestrator, null, "some-property", "int", "multi", "boolean", "hidden", "not_defined", "setting.secured", "setting.license.secured", "list");
resetSettings(orchestrator, PROJECT_KEY, PROJECT_SETTING_KEY, "sonar.coverage.exclusions");
}
@@ -134,9 +134,9 @@ public class DeprecatedPropertiesWsTest {
@Test
public void get_license_setting() throws Exception {
- setProperty("setting.license", "value", null);
+ setProperty("setting.license.secured", "value", null);
- assertThat(getProperty("setting.license", null).getValue()).isEqualTo("value");
+ assertThat(getProperty("setting.license.secured", null).getValue()).isEqualTo("value");
}
@Test
@@ -160,15 +160,14 @@ public class DeprecatedPropertiesWsTest {
@Test
public void license_setting_not_returned_to_not_logged() throws Exception {
- setProperty("setting.license", "value", null);
+ setProperty("setting.license.secured", "value", null);
// Admin and user can see the license setting
- assertThat(getProperties(null)).extracting(Properties.Property::getKey).contains("setting.license");
- assertThat(getProperties(userWsClient, null)).extracting(Properties.Property::getKey).contains("setting.license");
+ assertThat(getProperties(null)).extracting(Properties.Property::getKey).contains("setting.license.secured");
+ assertThat(getProperties(userWsClient, null)).extracting(Properties.Property::getKey).contains("setting.license.secured");
// Anonymous cannot see the license setting
- // FIXME Don't understand why it fails ???
- // assertThat(getProperties(anonymousWsClient, null)).extracting(Properties.Property::getKey).doesNotContain("setting.license");
+ assertThat(getProperties(anonymousWsClient, null)).extracting(Properties.Property::getKey).doesNotContain("setting.license.secured");
}
@Test