diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2019-08-14 16:50:27 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-08-14 20:21:17 +0200 |
commit | d871b268b3bf17bc4d08a5dec753dd78238180a3 (patch) | |
tree | aa1da559b34cbb0918ede690e39b7d022d5fbb02 /server/sonar-webserver-core | |
parent | c5312bd4a23d35d54844e851e6271ed450b85190 (diff) | |
download | sonarqube-d871b268b3bf17bc4d08a5dec753dd78238180a3.tar.gz sonarqube-d871b268b3bf17bc4d08a5dec753dd78238180a3.zip |
drop usage of dependency to sonar-webserver-api test jar
Diffstat (limited to 'server/sonar-webserver-core')
-rw-r--r-- | server/sonar-webserver-core/build.gradle | 1 | ||||
-rw-r--r-- | server/sonar-webserver-core/src/test/java/org/sonar/server/health/TestStandaloneHealthChecker.java | 39 |
2 files changed, 39 insertions, 1 deletions
diff --git a/server/sonar-webserver-core/build.gradle b/server/sonar-webserver-core/build.gradle index 0993d28c0f6..9e1d57fa1d7 100644 --- a/server/sonar-webserver-core/build.gradle +++ b/server/sonar-webserver-core/build.gradle @@ -73,7 +73,6 @@ dependencies { testCompile 'org.subethamail:subethasmtp' testCompile project(':server:sonar-db-testing') testCompile project(path: ":server:sonar-server-common", configuration: "tests") - testCompile project(path: ":server:sonar-webserver-api", configuration: "tests") testCompile project(path: ":server:sonar-webserver-auth", configuration: "tests") testCompile project(path: ":server:sonar-webserver-es", configuration: "tests") testCompile project(path: ":server:sonar-webserver-ws", configuration: "tests") diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/health/TestStandaloneHealthChecker.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/health/TestStandaloneHealthChecker.java new file mode 100644 index 00000000000..27c2e469dde --- /dev/null +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/health/TestStandaloneHealthChecker.java @@ -0,0 +1,39 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.server.health; + +public class TestStandaloneHealthChecker implements HealthChecker { + + private Health health = Health.newHealthCheckBuilder().setStatus(Health.Status.GREEN).build(); + + public void setHealth(Health h) { + this.health = h; + } + + @Override + public Health checkNode() { + return health; + } + + @Override + public ClusterHealth checkCluster() { + throw new IllegalStateException(); + } +} |