diff options
author | Lukasz Jarocki <lukasz.jarocki@sonarsource.com> | 2023-03-13 17:06:21 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-03-13 20:02:45 +0000 |
commit | b5a22322f8104d88626e454b0cf2484e206b351b (patch) | |
tree | c9f547e74f418bd78aa22326c5577b7bf4eca23c /server/sonar-db-core | |
parent | 828d3fded1f6dcc521a28c2ee3170efcb451332e (diff) | |
download | sonarqube-b5a22322f8104d88626e454b0cf2484e206b351b.tar.gz sonarqube-b5a22322f8104d88626e454b0cf2484e206b351b.zip |
SONAR-18679 refactored sonar-db-core and sonar-db-dao to match testing strategy
Diffstat (limited to 'server/sonar-db-core')
-rw-r--r-- | server/sonar-db-core/build.gradle | 11 | ||||
-rw-r--r-- | server/sonar-db-core/src/it/java/org/sonar/db/DatabaseUtilsIT.java (renamed from server/sonar-db-core/src/it/java/org/sonar/db/DatabaseUtilsTest.java) | 8 | ||||
-rw-r--r-- | server/sonar-db-core/src/it/java/org/sonar/db/ResultSetIteratorIT.java (renamed from server/sonar-db-core/src/it/java/org/sonar/db/ResultSetIteratorTest.java) | 4 | ||||
-rw-r--r-- | server/sonar-db-core/src/it/resources/org/sonar/db/DatabaseUtilsIT/sql.sql (renamed from server/sonar-db-core/src/it/resources/org/sonar/db/DatabaseUtilsTest/sql.sql) | 0 | ||||
-rw-r--r-- | server/sonar-db-core/src/it/resources/org/sonar/db/ResultSetIteratorIT/schema.sql (renamed from server/sonar-db-core/src/it/resources/org/sonar/db/ResultSetIteratorTest/schema.sql) | 0 |
5 files changed, 6 insertions, 17 deletions
diff --git a/server/sonar-db-core/build.gradle b/server/sonar-db-core/build.gradle index 6d3bad048e7..5413fef01b0 100644 --- a/server/sonar-db-core/build.gradle +++ b/server/sonar-db-core/build.gradle @@ -4,17 +4,6 @@ sonar { } } -sourceSets { - test { - resources { - srcDirs += ['src/it/resources'] - } - java{ - srcDirs += ['src/it/java'] - } - } -} - dependencies { // please keep the list grouped by configuration and ordered by name diff --git a/server/sonar-db-core/src/it/java/org/sonar/db/DatabaseUtilsTest.java b/server/sonar-db-core/src/it/java/org/sonar/db/DatabaseUtilsIT.java index a69683aa2f7..5fd95eb47e1 100644 --- a/server/sonar-db-core/src/it/java/org/sonar/db/DatabaseUtilsTest.java +++ b/server/sonar-db-core/src/it/java/org/sonar/db/DatabaseUtilsIT.java @@ -65,13 +65,13 @@ import static org.sonar.db.DatabaseUtils.tableColumnExists; import static org.sonar.db.DatabaseUtils.tableExists; import static org.sonar.db.DatabaseUtils.toUniqueAndSortedList; -public class DatabaseUtilsTest { +public class DatabaseUtilsIT { private static final String DEFAULT_SCHEMA = "public"; private static final String SCHEMA_MIGRATIONS_TABLE = "SCHEMA_MIGRATIONS"; @Rule - public CoreDbTester dbTester = CoreDbTester.createForSchema(DatabaseUtilsTest.class, "sql.sql", false); + public CoreDbTester dbTester = CoreDbTester.createForSchema(DatabaseUtilsIT.class, "sql.sql", false); @Rule public LogTester logTester = new LogTester(); @@ -480,8 +480,8 @@ public class DatabaseUtilsTest { } - private static DatabaseUtilsTest.MyComparable myComparable(int ordinal) { - return new DatabaseUtilsTest.MyComparable(ordinal); + private static DatabaseUtilsIT.MyComparable myComparable(int ordinal) { + return new DatabaseUtilsIT.MyComparable(ordinal); } private static final class MyComparable implements Comparable<MyComparable> { diff --git a/server/sonar-db-core/src/it/java/org/sonar/db/ResultSetIteratorTest.java b/server/sonar-db-core/src/it/java/org/sonar/db/ResultSetIteratorIT.java index 7f707438b60..6cc03541882 100644 --- a/server/sonar-db-core/src/it/java/org/sonar/db/ResultSetIteratorTest.java +++ b/server/sonar-db-core/src/it/java/org/sonar/db/ResultSetIteratorIT.java @@ -31,10 +31,10 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.fail; -public class ResultSetIteratorTest { +public class ResultSetIteratorIT { @Rule - public CoreDbTester dbTester = CoreDbTester.createForSchema(ResultSetIteratorTest.class, "schema.sql"); + public CoreDbTester dbTester = CoreDbTester.createForSchema(ResultSetIteratorIT.class, "schema.sql"); @Test public void create_iterator_from_statement() throws Exception { diff --git a/server/sonar-db-core/src/it/resources/org/sonar/db/DatabaseUtilsTest/sql.sql b/server/sonar-db-core/src/it/resources/org/sonar/db/DatabaseUtilsIT/sql.sql index 07cd0a57d26..07cd0a57d26 100644 --- a/server/sonar-db-core/src/it/resources/org/sonar/db/DatabaseUtilsTest/sql.sql +++ b/server/sonar-db-core/src/it/resources/org/sonar/db/DatabaseUtilsIT/sql.sql diff --git a/server/sonar-db-core/src/it/resources/org/sonar/db/ResultSetIteratorTest/schema.sql b/server/sonar-db-core/src/it/resources/org/sonar/db/ResultSetIteratorIT/schema.sql index 397253743fe..397253743fe 100644 --- a/server/sonar-db-core/src/it/resources/org/sonar/db/ResultSetIteratorTest/schema.sql +++ b/server/sonar-db-core/src/it/resources/org/sonar/db/ResultSetIteratorIT/schema.sql |