aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/test
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-08-12 16:54:28 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2011-08-12 16:54:28 +0200
commitd1390ffe5692ca3a4d45e430288b34f41bd89354 (patch)
tree56e6ae1505f267914670451ef7fb9e635d4a107e /sonar-server/src/test
parentd215c4570de138cc9565e02256b56a61a6326d7a (diff)
downloadsonarqube-d1390ffe5692ca3a4d45e430288b34f41bd89354.tar.gz
sonarqube-d1390ffe5692ca3a4d45e430288b34f41bd89354.zip
SONAR-2603 Generate the server key on the fly.
The server must not be restarted in order to compute its key.
Diffstat (limited to 'sonar-server/src/test')
-rw-r--r--sonar-server/src/test/java/org/sonar/server/platform/ServerImplTest.java2
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testDeleteProperties-result.xml2
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testDeleteProperties.xml3
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testSaveProperties-result.xml3
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testUpdateExistingProperties-result.xml2
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testUpdateExistingProperties.xml1
6 files changed, 5 insertions, 8 deletions
diff --git a/sonar-server/src/test/java/org/sonar/server/platform/ServerImplTest.java b/sonar-server/src/test/java/org/sonar/server/platform/ServerImplTest.java
index 4d5f0049b59..53eab63819a 100644
--- a/sonar-server/src/test/java/org/sonar/server/platform/ServerImplTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/platform/ServerImplTest.java
@@ -72,7 +72,7 @@ public class ServerImplTest extends AbstractDbUnitTestCase {
setupData("shouldGenerateKey");
ServerKeyGenerator keyGenerator = mock(ServerKeyGenerator.class);
- when(keyGenerator.generate("World Company", "http://192.168.0.1", null)).thenReturn("abcde");
+ when(keyGenerator.generate("World Company", "http://192.168.0.1")).thenReturn("abcde");
ServerImpl server = new ServerImpl(getSessionFactory(), keyGenerator, new Date());
server.start();
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testDeleteProperties-result.xml b/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testDeleteProperties-result.xml
index 0ade6f49fc9..f7ada567379 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testDeleteProperties-result.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testDeleteProperties-result.xml
@@ -3,5 +3,5 @@
<properties id="1" prop_key="other" resource_id="[null]" text_value="some text" user_id="[null]"/>
<!-- not null property -->
- <properties id="5" prop_key="sonar.core.startTime" resource_id="[null]" text_value="2010-05-18T17:59:00+0000" user_id="[null]"/>
+ <properties id="4" prop_key="sonar.core.startTime" resource_id="[null]" text_value="2010-05-18T17:59:00+0000" user_id="[null]"/>
</dataset> \ No newline at end of file
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testDeleteProperties.xml b/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testDeleteProperties.xml
index 8a3add2a585..ec292a1388d 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testDeleteProperties.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testDeleteProperties.xml
@@ -4,7 +4,6 @@
<properties id="2" prop_key="sonar.core.id" resource_id="[null]" text_value="123" user_id="[null]"/>
<properties id="3" prop_key="sonar.core.version" resource_id="[null]" text_value="2.2" user_id="[null]"/>
- <properties id="4" prop_key="sonar.serverKey.secured" resource_id="[null]" text_value="1abcdef" user_id="[null]"/>
- <properties id="5" prop_key="sonar.core.startTime" resource_id="[null]" text_value="2010-05-18T17:59:00+0000" user_id="[null]"/>
+ <properties id="4" prop_key="sonar.core.startTime" resource_id="[null]" text_value="2010-05-18T17:59:00+0000" user_id="[null]"/>
</dataset> \ No newline at end of file
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testSaveProperties-result.xml b/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testSaveProperties-result.xml
index 8a3add2a585..ec292a1388d 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testSaveProperties-result.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testSaveProperties-result.xml
@@ -4,7 +4,6 @@
<properties id="2" prop_key="sonar.core.id" resource_id="[null]" text_value="123" user_id="[null]"/>
<properties id="3" prop_key="sonar.core.version" resource_id="[null]" text_value="2.2" user_id="[null]"/>
- <properties id="4" prop_key="sonar.serverKey.secured" resource_id="[null]" text_value="1abcdef" user_id="[null]"/>
- <properties id="5" prop_key="sonar.core.startTime" resource_id="[null]" text_value="2010-05-18T17:59:00+0000" user_id="[null]"/>
+ <properties id="4" prop_key="sonar.core.startTime" resource_id="[null]" text_value="2010-05-18T17:59:00+0000" user_id="[null]"/>
</dataset> \ No newline at end of file
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testUpdateExistingProperties-result.xml b/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testUpdateExistingProperties-result.xml
index 5d4648e011a..365acc0ccd3 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testUpdateExistingProperties-result.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testUpdateExistingProperties-result.xml
@@ -5,5 +5,5 @@
<properties id="2" prop_key="sonar.core.id" resource_id="[null]" text_value="123" user_id="[null]"/>
<properties id="3" prop_key="sonar.core.version" resource_id="[null]" text_value="2.2" user_id="[null]"/>
<properties id="4" prop_key="sonar.core.startTime" resource_id="[null]" text_value="2010-05-18T17:59:00+0000" user_id="[null]"/>
- <properties id="5" prop_key="sonar.serverKey.secured" resource_id="[null]" text_value="1abcdef" user_id="[null]"/>
+
</dataset> \ No newline at end of file
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testUpdateExistingProperties.xml b/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testUpdateExistingProperties.xml
index bf4537c513d..824615a0cc5 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testUpdateExistingProperties.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/ServerMetadataPersisterTest/testUpdateExistingProperties.xml
@@ -5,6 +5,5 @@
<properties id="2" prop_key="sonar.core.id" resource_id="[null]" text_value="65" user_id="[null]"/>
<properties id="3" prop_key="sonar.core.version" resource_id="[null]" text_value="1.9" user_id="[null]"/>
<properties id="4" prop_key="sonar.core.startTime" resource_id="[null]" text_value="2008-04-18T17:59:00+0000" user_id="[null]"/>
- <properties id="5" prop_key="sonar.serverKey.secured" resource_id="[null]" text_value="other" user_id="[null]"/>
</dataset> \ No newline at end of file