aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-05-19 15:46:59 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2016-05-19 15:46:59 +0200
commit3b0ae6121fe5671ed584fea72bd3a65c77296cb5 (patch)
tree428081829dc575faaedd33e8cab645c3341ec6e7 /server
parent4478d4093e636acf7811e96b08fb9ecdbe22eb0f (diff)
downloadsonarqube-3b0ae6121fe5671ed584fea72bd3a65c77296cb5.tar.gz
sonarqube-3b0ae6121fe5671ed584fea72bd3a65c77296cb5.zip
Add missing test to LogServerIdTest
Diffstat (limited to 'server')
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/startup/LogServerIdTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/server/sonar-server/src/test/java/org/sonar/server/startup/LogServerIdTest.java b/server/sonar-server/src/test/java/org/sonar/server/startup/LogServerIdTest.java
index 34c10422c93..7b3206e852f 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/startup/LogServerIdTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/startup/LogServerIdTest.java
@@ -99,6 +99,17 @@ public class LogServerIdTest {
verifyLog("\"123456789\"", "-", "-");
}
+ @Test
+ public void log_partial_information_if_property_is_set_without_value() {
+ setProperty(CoreProperties.PERMANENT_SERVER_ID, "123456789");
+ PropertyDto dto = new PropertyDto().setKey(CoreProperties.ORGANISATION).setValue(null);
+ when(dbClient.propertiesDao().selectGlobalProperty(any(DbSession.class), eq(CoreProperties.ORGANISATION))).thenReturn(dto);
+
+ underTest.start();
+
+ verifyLog("\"123456789\"", "-", "-");
+ }
+
private void setProperty(String propertyKey, @Nullable String propertyValue) {
PropertyDto dto = null;
if (propertyValue != null) {