mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
feat(rds-data): adding data-api for postgresql (#1720)
* feat(rds-data): adding data-api for postgresql * Moving wrongly place test file under src/test
This commit is contained in:
1 parent
068b76a195
commit
272e4136e5
5 files changed
+589
-11
No files matched your search
+30
@@ -0,0 +1,30 @@
|
||||
package io.github.hectorvent.floci.services.rdsdata;
|
||||
|
||||
import io.github.hectorvent.floci.services.rds.model.DatabaseEngine;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
class RdsDataConnectionFactoryTest {
|
||||
|
||||
@Test
|
||||
void buildsMysqlUrl() {
|
||||
assertEquals(
|
||||
"jdbc:mysql://127.0.0.1:3306/app?useSSL=false&allowPublicKeyRetrieval=true",
|
||||
RdsDataConnectionFactory.buildUrl(DatabaseEngine.MYSQL, "127.0.0.1", 3306, "app"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void buildsMariadbUrlUsingMysqlDriver() {
|
||||
assertEquals(
|
||||
"jdbc:mysql://127.0.0.1:3306/app?useSSL=false&allowPublicKeyRetrieval=true",
|
||||
RdsDataConnectionFactory.buildUrl(DatabaseEngine.MARIADB, "127.0.0.1", 3306, "app"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void buildsPostgresUrl() {
|
||||
assertEquals(
|
||||
"jdbc:postgresql://127.0.0.1:5432/app?sslmode=disable",
|
||||
RdsDataConnectionFactory.buildUrl(DatabaseEngine.POSTGRES, "127.0.0.1", 5432, "app"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user