mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 14:38:48 +00:00
Fix smoke test database URLs
This commit is contained in:
3 files changed
+25
-8
No files matched your search
@@ -145,8 +145,14 @@ public final class CarbonCommonModule extends AbstractModule {
|
||||
switch (smokeTestMode) {
|
||||
case "h2" -> storageType = PrimaryConfig.StorageType.H2;
|
||||
case "json" -> storageType = PrimaryConfig.StorageType.JSON;
|
||||
case "postgres" -> storageType = PrimaryConfig.StorageType.PSQL;
|
||||
case "mariadb" -> storageType = PrimaryConfig.StorageType.MYSQL;
|
||||
case "postgres" -> {
|
||||
storageType = PrimaryConfig.StorageType.PSQL;
|
||||
configManager.primaryConfig().databaseSettings().url("jdbc:postgresql://localhost:5432/carbon");
|
||||
}
|
||||
case "mariadb" -> {
|
||||
storageType = PrimaryConfig.StorageType.MYSQL;
|
||||
configManager.primaryConfig().databaseSettings().url("jdbc:mariadb://localhost:3306/carbon");
|
||||
}
|
||||
default -> throw new IllegalArgumentException("Unknown smoke test mode: " + smokeTestMode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,10 @@ public class DatabaseSettings {
|
||||
return this.url;
|
||||
}
|
||||
|
||||
public String url(final String url) {
|
||||
return this.url = url;
|
||||
}
|
||||
|
||||
public String username() {
|
||||
return this.username;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user