diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-10-12 10:00:14 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-10-16 09:36:55 +0200 |
commit | 252fbe63ae0edb86307e54c5c5fbfe83e47b965e (patch) | |
tree | bbf7091a5476b1a923e025429add17a8e762888c /sonar-scanner-engine/src | |
parent | 36e1afc3d93ab23b01bb3911d311f157ef8c8fb0 (diff) | |
download | sonarqube-252fbe63ae0edb86307e54c5c5fbfe83e47b965e.tar.gz sonarqube-252fbe63ae0edb86307e54c5c5fbfe83e47b965e.zip |
SONAR-9863 replace old "permanent server ID" by the new one
Diffstat (limited to 'sonar-scanner-engine/src')
3 files changed, 3 insertions, 4 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalConfiguration.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalConfiguration.java index f22c14f4f99..7e6b04b51df 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalConfiguration.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalConfiguration.java @@ -51,7 +51,7 @@ public class GlobalConfiguration extends DefaultConfiguration { super(propertyDefinitions, encryption, mode, settings); this.serverSideSettings = unmodifiableMapWithTrimmedValues(propertyDefinitions, serverSideSettings); - get(CoreProperties.PERMANENT_SERVER_ID).ifPresent(v -> LOG.info("Server id: {}", v)); + get(CoreProperties.SERVER_ID).ifPresent(v -> LOG.info("Server id: {}", v)); new DroppedPropertyChecker(getProperties(), DROPPED_PROPERTIES).checkDroppedProperties(); } diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/platform/DefaultServer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/platform/DefaultServer.java index 06f72c3d250..796c6b4ea52 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/platform/DefaultServer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/platform/DefaultServer.java @@ -105,6 +105,6 @@ public class DefaultServer extends Server { @Override public String getPermanentServerId() { - return settings.getString(CoreProperties.PERMANENT_SERVER_ID); + return getId(); } } diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/platform/DefaultServerTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/platform/DefaultServerTest.java index 2af9a10feab..886588d6597 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/platform/DefaultServerTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/platform/DefaultServerTest.java @@ -39,7 +39,6 @@ public class DefaultServerTest { Settings settings = new MapSettings(); settings.setProperty(CoreProperties.SERVER_ID, "123"); settings.setProperty(CoreProperties.SERVER_STARTTIME, "2010-05-18T17:59:00+0000"); - settings.setProperty(CoreProperties.PERMANENT_SERVER_ID, "abcde"); ScannerWsClient client = mock(ScannerWsClient.class); when(client.baseUrl()).thenReturn("http://foo.com"); @@ -49,7 +48,7 @@ public class DefaultServerTest { assertThat(metadata.getVersion()).isEqualTo("2.2"); assertThat(metadata.getStartedAt()).isNotNull(); assertThat(metadata.getURL()).isEqualTo("http://foo.com"); - assertThat(metadata.getPermanentServerId()).isEqualTo("abcde"); + assertThat(metadata.getPermanentServerId()).isEqualTo("123"); assertThat(metadata.getRootDir()).isNull(); assertThat(metadata.getDeployDir()).isNull(); |