aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2019-08-28 17:33:17 +0200
committerSonarTech <sonartech@sonarsource.com>2019-09-02 20:21:04 +0200
commitb789401479f17bc69eac0c5676d24c704f37b707 (patch)
treed669d121c480cae721e64679944335c8ba929e51 /server
parentf0f55945b8c05cfb3feda3d06ceea4173467c31a (diff)
downloadsonarqube-b789401479f17bc69eac0c5676d24c704f37b707.tar.gz
sonarqube-b789401479f17bc69eac0c5676d24c704f37b707.zip
use testFixtures instead of test configuration of db-core
Diffstat (limited to 'server')
-rw-r--r--server/sonar-ce-task-projectanalysis/build.gradle1
-rw-r--r--server/sonar-ce/build.gradle1
-rw-r--r--server/sonar-db-core/build.gradle19
-rw-r--r--server/sonar-db-core/src/testFixtures/java/org/sonar/db/AbstractDbTester.java (renamed from server/sonar-db-core/src/test/java/org/sonar/db/AbstractDbTester.java)0
-rw-r--r--server/sonar-db-core/src/testFixtures/java/org/sonar/db/CoreDbTester.java (renamed from server/sonar-db-core/src/test/java/org/sonar/db/CoreDbTester.java)0
-rw-r--r--server/sonar-db-core/src/testFixtures/java/org/sonar/db/CoreH2Database.java (renamed from server/sonar-db-core/src/test/java/org/sonar/db/CoreH2Database.java)0
-rw-r--r--server/sonar-db-core/src/testFixtures/java/org/sonar/db/CoreTestDb.java (renamed from server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java)0
-rw-r--r--server/sonar-db-core/src/testFixtures/java/org/sonar/db/DefaultOrganizationTesting.java (renamed from server/sonar-db-core/src/test/java/org/sonar/db/DefaultOrganizationTesting.java)0
-rw-r--r--server/sonar-db-core/src/testFixtures/java/org/sonar/db/TestDb.java (renamed from server/sonar-db-core/src/test/java/org/sonar/db/TestDb.java)0
-rw-r--r--server/sonar-db-dao/build.gradle2
-rw-r--r--server/sonar-db-migration/build.gradle2
-rw-r--r--server/sonar-db-testing/build.gradle2
12 files changed, 8 insertions, 19 deletions
diff --git a/server/sonar-ce-task-projectanalysis/build.gradle b/server/sonar-ce-task-projectanalysis/build.gradle
index 4dc70203008..15226d64134 100644
--- a/server/sonar-ce-task-projectanalysis/build.gradle
+++ b/server/sonar-ce-task-projectanalysis/build.gradle
@@ -38,7 +38,6 @@ dependencies {
compile project(':sonar-core')
compile project(':server:sonar-ce-task')
- compile project(':server:sonar-db-core')
compile project(':server:sonar-db-dao')
compile project(':server:sonar-db-migration')
compile project(':server:sonar-process')
diff --git a/server/sonar-ce/build.gradle b/server/sonar-ce/build.gradle
index 731dbaeee7b..c828f41e767 100644
--- a/server/sonar-ce/build.gradle
+++ b/server/sonar-ce/build.gradle
@@ -19,7 +19,6 @@ dependencies {
compile project(':server:sonar-ce-task')
compile project(':server:sonar-ce-task-projectanalysis')
compile project(':server:sonar-db-dao')
- compile project(':server:sonar-db-core')
compile project(':server:sonar-process')
compile project(':server:sonar-ce-task')
compile project(':server:sonar-server-common')
diff --git a/server/sonar-db-core/build.gradle b/server/sonar-db-core/build.gradle
index e7e7485f052..f8bb54ca373 100644
--- a/server/sonar-db-core/build.gradle
+++ b/server/sonar-db-core/build.gradle
@@ -28,8 +28,6 @@ dependencies {
testCompile 'com.microsoft.sqlserver:mssql-jdbc'
testCompile 'com.oracle.jdbc:ojdbc8'
testCompile 'com.tngtech.java:junit-dataprovider'
- testCompile 'junit:junit'
- testCompile 'org.assertj:assertj-core'
testCompile 'org.mockito:mockito-core'
testCompile 'org.postgresql:postgresql'
testCompile project(':sonar-testing-harness')
@@ -38,6 +36,11 @@ dependencies {
testRuntime 'com.microsoft.sqlserver:mssql-jdbc'
testRuntime 'com.oracle.jdbc:ojdbc8'
testRuntime 'org.postgresql:postgresql'
+
+ testFixturesApi 'junit:junit'
+ testFixturesApi 'org.assertj:assertj-core'
+
+ testFixturesCompileOnly 'com.google.code.findbugs:jsr305'
}
test {
@@ -45,17 +48,6 @@ test {
systemProperty 'orchestrator.configUrl', System.getProperty('orchestrator.configUrl')
}
-task testJar(type: Jar) {
- classifier = 'tests'
- from sourceSets.test.output
-}
-
-configurations { tests { extendsFrom testRuntime } }
-
-artifacts {
- tests testJar
-}
-
artifactoryPublish.skip = false
// Used by core plugins
@@ -66,7 +58,6 @@ publishing {
if (release) {
artifact sourcesJar
artifact javadocJar
- artifact testJar
}
}
}
diff --git a/server/sonar-db-core/src/test/java/org/sonar/db/AbstractDbTester.java b/server/sonar-db-core/src/testFixtures/java/org/sonar/db/AbstractDbTester.java
index 0b9bb16bc6e..0b9bb16bc6e 100644
--- a/server/sonar-db-core/src/test/java/org/sonar/db/AbstractDbTester.java
+++ b/server/sonar-db-core/src/testFixtures/java/org/sonar/db/AbstractDbTester.java
diff --git a/server/sonar-db-core/src/test/java/org/sonar/db/CoreDbTester.java b/server/sonar-db-core/src/testFixtures/java/org/sonar/db/CoreDbTester.java
index ed85f851228..ed85f851228 100644
--- a/server/sonar-db-core/src/test/java/org/sonar/db/CoreDbTester.java
+++ b/server/sonar-db-core/src/testFixtures/java/org/sonar/db/CoreDbTester.java
diff --git a/server/sonar-db-core/src/test/java/org/sonar/db/CoreH2Database.java b/server/sonar-db-core/src/testFixtures/java/org/sonar/db/CoreH2Database.java
index f4a78eed82d..f4a78eed82d 100644
--- a/server/sonar-db-core/src/test/java/org/sonar/db/CoreH2Database.java
+++ b/server/sonar-db-core/src/testFixtures/java/org/sonar/db/CoreH2Database.java
diff --git a/server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java b/server/sonar-db-core/src/testFixtures/java/org/sonar/db/CoreTestDb.java
index 4479031f8c3..4479031f8c3 100644
--- a/server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java
+++ b/server/sonar-db-core/src/testFixtures/java/org/sonar/db/CoreTestDb.java
diff --git a/server/sonar-db-core/src/test/java/org/sonar/db/DefaultOrganizationTesting.java b/server/sonar-db-core/src/testFixtures/java/org/sonar/db/DefaultOrganizationTesting.java
index f2bb100e27c..f2bb100e27c 100644
--- a/server/sonar-db-core/src/test/java/org/sonar/db/DefaultOrganizationTesting.java
+++ b/server/sonar-db-core/src/testFixtures/java/org/sonar/db/DefaultOrganizationTesting.java
diff --git a/server/sonar-db-core/src/test/java/org/sonar/db/TestDb.java b/server/sonar-db-core/src/testFixtures/java/org/sonar/db/TestDb.java
index c87e3715c12..c87e3715c12 100644
--- a/server/sonar-db-core/src/test/java/org/sonar/db/TestDb.java
+++ b/server/sonar-db-core/src/testFixtures/java/org/sonar/db/TestDb.java
diff --git a/server/sonar-db-dao/build.gradle b/server/sonar-db-dao/build.gradle
index b6f989e601f..ac0c3db3aa8 100644
--- a/server/sonar-db-dao/build.gradle
+++ b/server/sonar-db-dao/build.gradle
@@ -30,7 +30,7 @@ dependencies {
testCompile 'org.mockito:mockito-core'
testCompile 'org.sonarsource.orchestrator:sonar-orchestrator'
testCompile project(':sonar-testing-harness')
- testCompile project(':server:sonar-db-core').sourceSets.test.output
+ testCompile testFixtures(project(':server:sonar-db-core'))
testCompile project(':sonar-plugin-api-impl')
testCompileOnly 'com.google.code.findbugs:jsr305'
diff --git a/server/sonar-db-migration/build.gradle b/server/sonar-db-migration/build.gradle
index 4c36d880a94..4dd9a0d0b58 100644
--- a/server/sonar-db-migration/build.gradle
+++ b/server/sonar-db-migration/build.gradle
@@ -27,7 +27,7 @@ dependencies {
testCompile 'org.mockito:mockito-core'
testCompile project(':sonar-scanner-protocol')
testCompile project(':sonar-testing-harness')
- testCompile project(':server:sonar-db-core').sourceSets.test.output
+ testCompile testFixtures(project(':server:sonar-db-core'))
testRuntime 'com.h2database:h2'
testRuntime 'com.microsoft.sqlserver:mssql-jdbc'
diff --git a/server/sonar-db-testing/build.gradle b/server/sonar-db-testing/build.gradle
index d3ad8365f54..0b76a66038d 100644
--- a/server/sonar-db-testing/build.gradle
+++ b/server/sonar-db-testing/build.gradle
@@ -8,6 +8,6 @@ dependencies {
// please keep the list grouped by configuration and ordered by name
compile 'com.h2database:h2'
- compile project(':server:sonar-db-core').sourceSets.test.output
+ compile testFixtures(project(':server:sonar-db-core'))
compile project(':server:sonar-db-dao').sourceSets.test.output
}