aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application/src/test
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-10-24 12:36:43 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2013-10-24 12:39:46 +0200
commit680f549abb87cc79b0d09a07add1a666dd2d0387 (patch)
tree28b9285d1e7af895d09d153000f9c0519fd69a9f /sonar-application/src/test
parent9a6ec4bb5b2fd7b2e3e722246f460e99c4d1a564 (diff)
downloadsonarqube-680f549abb87cc79b0d09a07add1a666dd2d0387.tar.gz
sonarqube-680f549abb87cc79b0d09a07add1a666dd2d0387.zip
SONAR-4741 Log clear message when HTTP and HTTPS ports are the same
Diffstat (limited to 'sonar-application/src/test')
-rw-r--r--sonar-application/src/test/java/org/sonar/application/ConnectorsTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/sonar-application/src/test/java/org/sonar/application/ConnectorsTest.java b/sonar-application/src/test/java/org/sonar/application/ConnectorsTest.java
index 8ed7c4d0b9b..e95af633028 100644
--- a/sonar-application/src/test/java/org/sonar/application/ConnectorsTest.java
+++ b/sonar-application/src/test/java/org/sonar/application/ConnectorsTest.java
@@ -153,6 +153,19 @@ public class ConnectorsTest {
}));
}
+ @Test
+ public void http_and_https_ports_should_be_different() throws Exception {
+ Properties p = new Properties();
+ p.setProperty("sonar.web.port", "9000");
+ p.setProperty("sonar.web.https.port", "9000");
+
+ try {
+ Connectors.configure(tomcat, new Props(p));
+ fail();
+ } catch (IllegalStateException e) {
+ assertThat(e).hasMessage("HTTP and HTTPS must not use the same port 9000");
+ }
+ }
//---- shutdown port