From c828f01aaad1a1f00ec4650c2574247ef20d35c6 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Thu, 7 Apr 2022 19:00:28 +0100 Subject: [PATCH] Linting --- roomserver/internal/input/input_test.go | 27 +------------------------ 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/roomserver/internal/input/input_test.go b/roomserver/internal/input/input_test.go index 8be8aecb0..21492760d 100644 --- a/roomserver/internal/input/input_test.go +++ b/roomserver/internal/input/input_test.go @@ -2,8 +2,6 @@ package input_test import ( "context" - "fmt" - "os" "testing" "time" @@ -15,29 +13,6 @@ import ( "github.com/matrix-org/gomatrixserverlib" ) -func psqlConnectionString() config.DataSource { - user := os.Getenv("POSTGRES_USER") - if user == "" { - user = "dendrite" - } - dbName := os.Getenv("POSTGRES_DB") - if dbName == "" { - dbName = "dendrite" - } - connStr := fmt.Sprintf( - "user=%s dbname=%s sslmode=disable", user, dbName, - ) - password := os.Getenv("POSTGRES_PASSWORD") - if password != "" { - connStr += fmt.Sprintf(" password=%s", password) - } - host := os.Getenv("POSTGRES_HOST") - if host != "" { - connStr += fmt.Sprintf(" host=%s", host) - } - return config.DataSource(connStr) -} - func TestSingleTransactionOnInput(t *testing.T) { t.SkipNow() // this doesn't work even with postgres enabled due to nats client not being set and you can't easily make one. deadline, _ := t.Deadline() @@ -64,7 +39,7 @@ func TestSingleTransactionOnInput(t *testing.T) { } db, err := storage.Open( &config.DatabaseOptions{ - ConnectionString: psqlConnectionString(), + ConnectionString: "", MaxOpenConnections: 1, MaxIdleConnections: 1, },