@@ -50,6 +50,7 @@ import static java.lang.String.format; | |||
import static java.util.stream.Stream.concat; | |||
import static org.apache.commons.lang.StringUtils.isEmpty; | |||
import static org.sonar.api.CoreProperties.PERMANENT_SERVER_ID; | |||
import static org.sonar.api.CoreProperties.SERVER_ID; | |||
import static org.sonar.api.CoreProperties.SERVER_STARTTIME; | |||
import static org.sonar.api.PropertyType.LICENSE; | |||
import static org.sonar.api.PropertyType.PROPERTY_SET; | |||
@@ -67,7 +68,7 @@ public class ValuesAction implements SettingsWsAction { | |||
private static final Splitter COMMA_SPLITTER = Splitter.on(","); | |||
private static final String COMMA_ENCODED_VALUE = "%2C"; | |||
private static final Set<String> ADDITIONAL_KEYS = ImmutableSet.of(PERMANENT_SERVER_ID, SERVER_STARTTIME); | |||
private static final Set<String> ADDITIONAL_KEYS = ImmutableSet.of(PERMANENT_SERVER_ID, SERVER_STARTTIME, SERVER_ID); | |||
private final DbClient dbClient; | |||
private final ComponentFinder componentFinder; |
@@ -622,13 +622,14 @@ public class ValuesActionTest { | |||
definitions.addComponent(PropertyDefinition.builder("plugin.license.secured").type(LICENSE).build()); | |||
propertyDb.insertProperties( | |||
newGlobalPropertyDto().setKey("sonar.server_id").setValue("12345"), | |||
newGlobalPropertyDto().setKey("sonar.core.id").setValue("ID"), | |||
newGlobalPropertyDto().setKey("sonar.core.startTime").setValue("2017-01-01"), | |||
newGlobalPropertyDto().setKey("plugin.license.secured").setValue("ABCD"), | |||
newGlobalPropertyDto().setKey("plugin.licenseHash.secured").setValue("987654321")); | |||
ValuesWsResponse result = executeRequestForGlobalProperties(); | |||
assertThat(result.getSettingsList()).extracting(Settings.Setting::getKey).containsOnly("sonar.server_id", "sonar.core.startTime", "plugin.license.secured", | |||
assertThat(result.getSettingsList()).extracting(Settings.Setting::getKey).containsOnly("sonar.server_id", "sonar.core.id", "sonar.core.startTime", "plugin.license.secured", | |||
"plugin.licenseHash.secured"); | |||
} | |||