[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] 02/02: Fix #7890 follow-up.
From: |
gnunet |
Subject: |
[libeufin] 02/02: Fix #7890 follow-up. |
Date: |
Fri, 28 Jul 2023 17:11:56 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
commit 48c1cc4ce7e338d14093b2e04ccd621282a451ee
Author: MS <ms@taler.net>
AuthorDate: Fri Jul 28 17:11:04 2023 +0200
Fix #7890 follow-up.
---
sandbox/src/test/kotlin/DBTest.kt | 1 +
util/src/main/kotlin/DB.kt | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/sandbox/src/test/kotlin/DBTest.kt
b/sandbox/src/test/kotlin/DBTest.kt
index 21e47415..e85d0ea9 100644
--- a/sandbox/src/test/kotlin/DBTest.kt
+++ b/sandbox/src/test/kotlin/DBTest.kt
@@ -57,6 +57,7 @@ class DBTest {
@Test
fun connectionStringTest() {
var conv = getJdbcConnectionFromPg("postgresql:///libeufincheck")
+ connectWithSchema(getJdbcConnectionFromPg("postgres:///libeufincheck"))
connectWithSchema(conv)
conv =
getJdbcConnectionFromPg("postgresql://localhost:5432/libeufincheck?user=${System.getProperty("user.name")}")
connectWithSchema(conv)
diff --git a/util/src/main/kotlin/DB.kt b/util/src/main/kotlin/DB.kt
index 169a1d40..d61fa2d2 100644
--- a/util/src/main/kotlin/DB.kt
+++ b/util/src/main/kotlin/DB.kt
@@ -261,7 +261,7 @@ fun connectWithSchema(jdbcConn: String, schemaName: String?
= null) {
* sockets need individual intervention.
*/
fun getJdbcConnectionFromPg(pgConn: String): String {
- if (!pgConn.startsWith("postgresql://")) {
+ if (!pgConn.startsWith("postgresql://") &&
!pgConn.startsWith("postgres://")) {
logger.info("Not a Postgres connection string: $pgConn")
throw internalServerError("Not a Postgres connection string: $pgConn")
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.