Fix smoke test database URLs

This commit is contained in:
Jason Penilla committed 2025-05-18 21:12:39 -07:00
1 parent b820439d46
commit 77b1ae16ad
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;
}