From 3b52502005319ab1d8fd012e33be5db5b83e6b90 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Thu, 29 Aug 2019 14:52:26 +0200 Subject: [PATCH] use testFixtures instead of test configuration of webserver-es --- server/sonar-webserver-core/build.gradle | 2 +- server/sonar-webserver-es/build.gradle | 18 ++---------------- .../permission/index/FooIndexDefinition.java | 0 .../index/PermissionIndexerTester.java | 0 server/sonar-webserver-webapi/build.gradle | 2 +- server/sonar-webserver/build.gradle | 2 +- 6 files changed, 5 insertions(+), 19 deletions(-) rename server/sonar-webserver-es/src/{test => testFixtures}/java/org/sonar/server/permission/index/FooIndexDefinition.java (100%) rename server/sonar-webserver-es/src/{test => testFixtures}/java/org/sonar/server/permission/index/PermissionIndexerTester.java (100%) diff --git a/server/sonar-webserver-core/build.gradle b/server/sonar-webserver-core/build.gradle index 5c2bf7046e1..221d8981d55 100644 --- a/server/sonar-webserver-core/build.gradle +++ b/server/sonar-webserver-core/build.gradle @@ -72,7 +72,7 @@ dependencies { testCompile 'org.subethamail:subethasmtp' testCompile testFixtures(project(':server:sonar-server-common')) testCompile testFixtures(project(':server:sonar-webserver-auth')) - testCompile project(path: ":server:sonar-webserver-es", configuration: "tests") + testCompile testFixtures(project(':server:sonar-webserver-es')) testCompile testFixtures(project(':server:sonar-webserver-ws')) testCompile project(':sonar-testing-harness') diff --git a/server/sonar-webserver-es/build.gradle b/server/sonar-webserver-es/build.gradle index c95cc907dfe..1e72c130fc7 100644 --- a/server/sonar-webserver-es/build.gradle +++ b/server/sonar-webserver-es/build.gradle @@ -4,12 +4,6 @@ sonarqube { } } -configurations { - tests - - testCompile.extendsFrom tests -} - dependencies { // please keep the list grouped by configuration and ordered by name @@ -28,15 +22,7 @@ dependencies { testCompile 'com.tngtech.java:junit-dataprovider' testCompile 'org.mockito:mockito-core' testCompile testFixtures(project(':server:sonar-webserver-auth')) - testCompile testFixtures(project(':server:sonar-server-common')) testCompile project(':sonar-testing-harness') -} - -task testJar(type: Jar) { - classifier = 'tests' - from sourceSets.test.output -} - -artifacts { - tests testJar + + testFixturesApi testFixtures(project(':server:sonar-server-common')) } diff --git a/server/sonar-webserver-es/src/test/java/org/sonar/server/permission/index/FooIndexDefinition.java b/server/sonar-webserver-es/src/testFixtures/java/org/sonar/server/permission/index/FooIndexDefinition.java similarity index 100% rename from server/sonar-webserver-es/src/test/java/org/sonar/server/permission/index/FooIndexDefinition.java rename to server/sonar-webserver-es/src/testFixtures/java/org/sonar/server/permission/index/FooIndexDefinition.java diff --git a/server/sonar-webserver-es/src/test/java/org/sonar/server/permission/index/PermissionIndexerTester.java b/server/sonar-webserver-es/src/testFixtures/java/org/sonar/server/permission/index/PermissionIndexerTester.java similarity index 100% rename from server/sonar-webserver-es/src/test/java/org/sonar/server/permission/index/PermissionIndexerTester.java rename to server/sonar-webserver-es/src/testFixtures/java/org/sonar/server/permission/index/PermissionIndexerTester.java diff --git a/server/sonar-webserver-webapi/build.gradle b/server/sonar-webserver-webapi/build.gradle index 28fc2515632..8f763ddc2a9 100644 --- a/server/sonar-webserver-webapi/build.gradle +++ b/server/sonar-webserver-webapi/build.gradle @@ -29,7 +29,7 @@ dependencies { testCompile 'org.mockito:mockito-core' testCompile testFixtures(project(':server:sonar-server-common')) testCompile testFixtures(project(':server:sonar-webserver-auth')) - testCompile project(path: ":server:sonar-webserver-es", configuration: "tests") + testCompile testFixtures(project(':server:sonar-webserver-es')) testCompile testFixtures(project(':server:sonar-webserver-ws')) testCompile project(':sonar-testing-harness') } diff --git a/server/sonar-webserver/build.gradle b/server/sonar-webserver/build.gradle index 7ff5d71250d..4fc1039102f 100644 --- a/server/sonar-webserver/build.gradle +++ b/server/sonar-webserver/build.gradle @@ -28,6 +28,6 @@ dependencies { testCompile 'org.eclipse.jetty:jetty-servlet' testCompile testFixtures(project(':server:sonar-server-common')) testCompile testFixtures(project(':server:sonar-webserver-auth')) - testCompile project(path: ":server:sonar-webserver-es", configuration: "tests") + testCompile testFixtures(project(':server:sonar-webserver-es')) testCompile project(':sonar-testing-harness') } -- 2.39.5