mirror of
https://github.com/lucko/LuckPerms.git
synced 2025-09-01 18:32:33 +02:00
Update mariadb driver (#3583)
This commit is contained in:
@@ -34,7 +34,7 @@ dependencies {
|
||||
testImplementation 'com.impossibl.pgjdbc-ng:pgjdbc-ng:0.8.9'
|
||||
testImplementation 'com.h2database:h2:2.1.214'
|
||||
testImplementation 'mysql:mysql-connector-java:8.0.23'
|
||||
testImplementation 'org.mariadb.jdbc:mariadb-java-client:2.7.2'
|
||||
testImplementation 'org.mariadb.jdbc:mariadb-java-client:3.1.3'
|
||||
testImplementation 'org.mongodb:mongodb-driver-legacy:4.5.0'
|
||||
testImplementation 'me.lucko.configurate:configurate-toml:3.7'
|
||||
testImplementation 'org.spongepowered:configurate-hocon:3.7.2'
|
||||
|
@@ -82,7 +82,7 @@ public class MessagingIntegrationTest {
|
||||
}
|
||||
|
||||
@Nested
|
||||
class Sql {
|
||||
class MySql {
|
||||
|
||||
@Container
|
||||
private final GenericContainer<?> container = new GenericContainer<>(DockerImageName.parse("mysql:8"))
|
||||
@@ -109,6 +109,36 @@ public class MessagingIntegrationTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
class MariaDb {
|
||||
|
||||
@Container
|
||||
private final GenericContainer<?> container = new GenericContainer<>(DockerImageName.parse("mariadb"))
|
||||
.withEnv("MARIADB_USER", "minecraft")
|
||||
.withEnv("MARIADB_PASSWORD", "passw0rd")
|
||||
.withEnv("MARIADB_ROOT_PASSWORD", "rootpassw0rd")
|
||||
.withEnv("MARIADB_DATABASE", "minecraft")
|
||||
.withExposedPorts(3306);
|
||||
|
||||
@Test
|
||||
public void testMySql(@TempDir Path tempDirA, @TempDir Path tempDirB) throws InterruptedException {
|
||||
assertTrue(this.container.isRunning());
|
||||
|
||||
String host = this.container.getHost();
|
||||
Integer port = this.container.getFirstMappedPort();
|
||||
|
||||
Map<String, String> config = ImmutableMap.<String, String>builder()
|
||||
.put("storage-method", "mariadb")
|
||||
.put("data.address", host + ":" + port)
|
||||
.put("data.database", "minecraft")
|
||||
.put("data.username", "minecraft")
|
||||
.put("data.password", "passw0rd")
|
||||
.build();
|
||||
|
||||
testMessaging(config, tempDirA, tempDirB);
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
class Postgres {
|
||||
|
||||
|
Reference in New Issue
Block a user