Polish "Add support for test containers jdbc url"

See gh-19044
pull/19159/head
Stephane Nicoll 5 years ago
parent 7b1b18cd77
commit 4c7896b936

@ -472,6 +472,21 @@
<artifactId>spring-data-redis</artifactId> <artifactId>spring-data-redis</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>jdbc</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency> <dependency>
<groupId>org.xerial</groupId> <groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId> <artifactId>sqlite-jdbc</artifactId>

@ -44,9 +44,9 @@ import static org.assertj.core.api.Assertions.assertThat;
*/ */
class DatabaseDriverClassNameTests { class DatabaseDriverClassNameTests {
private static final Set<DatabaseDriver> EXCLUDED_DRIVERS = Collections.unmodifiableSet( private static final Set<DatabaseDriver> EXCLUDED_DRIVERS = Collections
EnumSet.of(DatabaseDriver.UNKNOWN, DatabaseDriver.DB2_AS400, DatabaseDriver.INFORMIX, DatabaseDriver.HANA, .unmodifiableSet(EnumSet.of(DatabaseDriver.UNKNOWN, DatabaseDriver.DB2_AS400, DatabaseDriver.INFORMIX,
DatabaseDriver.TERADATA, DatabaseDriver.REDSHIFT, DatabaseDriver.TESTCONTAINERS)); DatabaseDriver.HANA, DatabaseDriver.TERADATA, DatabaseDriver.REDSHIFT));
@ParameterizedTest(name = "{0} {2}") @ParameterizedTest(name = "{0} {2}")
@MethodSource @MethodSource

@ -112,7 +112,7 @@ class DatabaseDriverTests {
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:informix-sqli://localhost:1533/sample")) assertThat(DatabaseDriver.fromJdbcUrl("jdbc:informix-sqli://localhost:1533/sample"))
.isEqualTo(DatabaseDriver.INFORMIX); .isEqualTo(DatabaseDriver.INFORMIX);
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:informix-direct://sample")).isEqualTo(DatabaseDriver.INFORMIX); assertThat(DatabaseDriver.fromJdbcUrl("jdbc:informix-direct://sample")).isEqualTo(DatabaseDriver.INFORMIX);
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:tc:sample://localhost:3306/sample")) assertThat(DatabaseDriver.fromJdbcUrl("jdbc:tc:mysql://localhost:3306/sample"))
.isEqualTo(DatabaseDriver.TESTCONTAINERS); .isEqualTo(DatabaseDriver.TESTCONTAINERS);
} }

Loading…
Cancel
Save