From d871b268b3bf17bc4d08a5dec753dd78238180a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Wed, 14 Aug 2019 16:50:27 +0200 Subject: [PATCH] drop usage of dependency to sonar-webserver-api test jar --- server/sonar-webserver-api/build.gradle | 15 --------------- server/sonar-webserver-core/build.gradle | 1 - .../health/TestStandaloneHealthChecker.java | 0 server/sonar-webserver-webapi/build.gradle | 1 - .../setting/TestProjectConfigurationLoader.java | 0 .../sonar/server/ui/ws}/BranchFeatureRule.java | 3 ++- .../org/sonar/server/ui/ws/GlobalActionTest.java | 1 - .../sonar/server/util/TypeValidationsTesting.java | 0 server/sonar-webserver/build.gradle | 1 - 9 files changed, 2 insertions(+), 20 deletions(-) rename server/{sonar-webserver-api => sonar-webserver-core}/src/test/java/org/sonar/server/health/TestStandaloneHealthChecker.java (100%) rename server/{sonar-webserver-api => sonar-webserver-webapi}/src/test/java/org/sonar/server/setting/TestProjectConfigurationLoader.java (100%) rename server/{sonar-webserver-api/src/test/java/org/sonar/server/branch => sonar-webserver-webapi/src/test/java/org/sonar/server/ui/ws}/BranchFeatureRule.java (93%) rename server/{sonar-webserver-api => sonar-webserver-webapi}/src/test/java/org/sonar/server/util/TypeValidationsTesting.java (100%) diff --git a/server/sonar-webserver-api/build.gradle b/server/sonar-webserver-api/build.gradle index 53fe4368afa..62d2bd8c42f 100644 --- a/server/sonar-webserver-api/build.gradle +++ b/server/sonar-webserver-api/build.gradle @@ -14,12 +14,6 @@ sourceSets { } } -configurations { - tests - - testCompile.extendsFrom tests -} - dependencies { // please keep the list grouped by configuration and ordered by name @@ -46,12 +40,3 @@ dependencies { testCompile project(path: ":server:sonar-server-common", configuration: "tests") testCompile project(':sonar-testing-harness') } - -task testJar(type: Jar) { - classifier = 'tests' - from sourceSets.test.output -} - -artifacts { - tests testJar -} 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-api/src/test/java/org/sonar/server/health/TestStandaloneHealthChecker.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/health/TestStandaloneHealthChecker.java similarity index 100% rename from server/sonar-webserver-api/src/test/java/org/sonar/server/health/TestStandaloneHealthChecker.java rename to server/sonar-webserver-core/src/test/java/org/sonar/server/health/TestStandaloneHealthChecker.java diff --git a/server/sonar-webserver-webapi/build.gradle b/server/sonar-webserver-webapi/build.gradle index b2a02fd039d..b1428c97c94 100644 --- a/server/sonar-webserver-webapi/build.gradle +++ b/server/sonar-webserver-webapi/build.gradle @@ -35,7 +35,6 @@ dependencies { testCompile 'org.mockito:mockito-core' 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-api/src/test/java/org/sonar/server/setting/TestProjectConfigurationLoader.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/setting/TestProjectConfigurationLoader.java similarity index 100% rename from server/sonar-webserver-api/src/test/java/org/sonar/server/setting/TestProjectConfigurationLoader.java rename to server/sonar-webserver-webapi/src/test/java/org/sonar/server/setting/TestProjectConfigurationLoader.java diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/branch/BranchFeatureRule.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/ui/ws/BranchFeatureRule.java similarity index 93% rename from server/sonar-webserver-api/src/test/java/org/sonar/server/branch/BranchFeatureRule.java rename to server/sonar-webserver-webapi/src/test/java/org/sonar/server/ui/ws/BranchFeatureRule.java index 2bf56463474..bd185e46b5d 100644 --- a/server/sonar-webserver-api/src/test/java/org/sonar/server/branch/BranchFeatureRule.java +++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/ui/ws/BranchFeatureRule.java @@ -17,9 +17,10 @@ * 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.branch; +package org.sonar.server.ui.ws; import org.junit.rules.ExternalResource; +import org.sonar.server.branch.BranchFeatureProxy; public class BranchFeatureRule extends ExternalResource implements BranchFeatureProxy { diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java index 1a20d2e87fe..0d4a2a29cd2 100644 --- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java +++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java @@ -37,7 +37,6 @@ import org.sonar.core.platform.PluginRepository; import org.sonar.db.DbClient; import org.sonar.db.dialect.H2; import org.sonar.db.dialect.PostgreSql; -import org.sonar.server.branch.BranchFeatureRule; import org.sonar.server.organization.DefaultOrganizationProvider; import org.sonar.server.organization.TestDefaultOrganizationProvider; import org.sonar.server.organization.TestOrganizationFlags; diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/util/TypeValidationsTesting.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/util/TypeValidationsTesting.java similarity index 100% rename from server/sonar-webserver-api/src/test/java/org/sonar/server/util/TypeValidationsTesting.java rename to server/sonar-webserver-webapi/src/test/java/org/sonar/server/util/TypeValidationsTesting.java diff --git a/server/sonar-webserver/build.gradle b/server/sonar-webserver/build.gradle index 863fa2769b9..4096c8a8f11 100644 --- a/server/sonar-webserver/build.gradle +++ b/server/sonar-webserver/build.gradle @@ -28,7 +28,6 @@ dependencies { testCompile 'org.eclipse.jetty:jetty-servlet' 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(':sonar-testing-harness') -- 2.39.5